| Summary: | NullPointerException in DirtyResourceFactory.getIndex() | ||
|---|---|---|---|
| Product: | [Modeling] EMF | Reporter: | Axel Uhl <eclipse> |
| Component: | Query2 | Assignee: | Project Inbox <emf.query2-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | eclipse, saurav.sarkar1 |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows 7 | ||
| Whiteboard: | |||
|
Description
Axel Uhl
Hi Axel, DirtyResourceFactory has been introduced to keep track of the dirty index. Could you please check this link https://bugs.eclipse.org/bugs/show_bug.cgi?id=324176 And also the TestQueryBugs.java which contains an example of how the DirtyResourceFactory could be setup. cheers, Saurav It seems the DirtyResourceFactory instance could use some initialization. A tiny ugly patch that fixes it quick/dirty for us is this:
diff --git a/EMF/query2/org.eclipse.emf.query2/plugins/org.eclipse.emf.query2.core/src/org/eclipse/emf/query2/internal/shared/EmfHelper.java b/EMF/query2/org.eclipse.emf.query2/plugins/org.eclipse.emf.query2.core/src/org/eclipse/emf/query2/
internal/shared/EmfHelper.java
index 26b483a..e573fcb 100644
--- a/EMF/query2/org.eclipse.emf.query2/plugins/org.eclipse.emf.query2.core/src/org/eclipse/emf/query2/internal/shared/EmfHelper.java
+++ b/EMF/query2/org.eclipse.emf.query2/plugins/org.eclipse.emf.query2.core/src/org/eclipse/emf/query2/internal/shared/EmfHelper.java
@@ -239,7 +239,7 @@ public class EmfHelper {
private Index getBackwardNavIndex() {
if (useDirty) {
//The dirty index is maintained by the DirtyResourceFactory
- return DirtyResourceFactory.getIndex();
+ return DirtyResourceFactory.getInstance().getIndex();
} else {
return this.index;
}
Provided the NPE check in the Query core code where it accesses the DirtyResourceFactory. Hence closing the bug |