[403943] CategorizedProblems problem in JSP file are disappearing when the annotations processor is turned on.
diff --git a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
index 428e289..0112254 100644
--- a/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
+++ b/bundles/org.eclipse.jst.jsp.core/src/org/eclipse/jst/jsp/core/internal/java/JSPTranslation.java
@@ -538,15 +538,25 @@
*/
public void reconcileCompilationUnit() {
ICompilationUnit cu = getCompilationUnit();
+ boolean isClosed = false;
if (cu != null) {
try {
synchronized(cu) {
- cu.reconcile(ICompilationUnit.NO_AST, false, getWorkingCopyOwner(), getProgressMonitor());
+ isClosed = !cu.isOpen();
+ if (isClosed) {
+ cu.becomeWorkingCopy(null);
+ }
+ cu.reconcile(ICompilationUnit.NO_AST, true, getWorkingCopyOwner(), getProgressMonitor());
}
}
catch (JavaModelException e) {
Logger.logException(e);
}
+ finally {
+ if (isClosed) {
+ release();
+ }
+ }
}
}