Community
Participate
Working Groups
Create *any* class in a JPA or JAXB project. Change (via text editor) to enum. Get the following NPE: java.lang.NullPointerException at org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotatedElement.syncAnnotations(SourceAnnotatedElement.java:252) at org.eclipse.jpt.common.core.internal.resource.java.source.SourceAnnotatedElement.synchronizeWith(SourceAnnotatedElement.java:104) at org.eclipse.jpt.common.core.internal.resource.java.source.SourceMember.synchronizeWith(SourceMember.java:58) at org.eclipse.jpt.common.core.internal.resource.java.source.SourceAbstractType.synchronizeWith(SourceAbstractType.java:64) at org.eclipse.jpt.common.core.internal.resource.java.source.SourceType.synchronizeWith(SourceType.java:130) at org.eclipse.jpt.common.core.internal.resource.java.source.SourceTypeCompilationUnit.syncPrimaryType(SourceTypeCompilationUnit.java:120) at org.eclipse.jpt.common.core.internal.resource.java.source.SourceTypeCompilationUnit.synchronizeWith(SourceTypeCompilationUnit.java:68) at org.eclipse.jpt.common.core.internal.resource.java.source.SourceCompilationUnit.synchronizeWithJavaSource(SourceCompilationUnit.java:157) at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.processJavaCompilationUnitDelta(AbstractJpaProject.java:1348) at org.eclipse.jpt.jpa.core.internal.AbstractJpaProject.processJavaDelta(AbstractJpaProject.java:1193) ...
The NPE will continue happening for the life of the class/workbench session.
This is only an issue in JPA in the 3.1 stream. This problem exists in JAXB in 3.0 and 3.1 where we had separate java resource models for JPA and JAXB. Paul, did you actually test this in 2.3.4?
No, 2.3.4 was the automatic entry, which is weird. It exists in current code.
Created attachment 204977 [details] proposed patch against maintenance
fixed in head, attached a patch for maintenance
fixed in 3.0 maintenance
Verified in Build M-3.3.2-20111107105838 Verified you can change class to enum in java class editor without error. See the link to view test steps for verification. http://wiki.eclipse.org/Dali_3.0.2