Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 323005 - NPE in AnnotationContainerTools
Summary: NPE in AnnotationContainerTools
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: General (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 2.3.2   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-18 06:13 EDT by Dmitry Geraskov CLA
Modified: 2010-08-23 13:09 EDT (History)
2 users (show)

See Also:
neil.hauge: review+


Attachments
proposed patch for 2.3 maintenance (3.50 KB, patch)
2010-08-23 11:49 EDT, Karen Butzke CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Geraskov CLA 2010-08-18 06:13:04 EDT
Build Identifier: I20100608-0911

java.lang.NullPointerException
	at org.eclipse.jpt.core.internal.resource.java.source.AnnotationContainerTools.getNestedAstAnnotations(AnnotationContainerTools.java:139)
	at org.eclipse.jpt.core.internal.resource.java.source.AnnotationContainerTools.synchronize(AnnotationContainerTools.java:240)
	at org.eclipse.jpt.core.internal.resource.java.source.SourceBaseNamedQueryAnnotation.synchronizeWith(SourceBaseNamedQueryAnnotation.java:74)
	at org.eclipse.jpt.core.internal.resource.java.source.AnnotationContainerTools.synchronize(AnnotationContainerTools.java:247)
	at org.eclipse.jpt.core.internal.resource.java.source.SourceNamedQueriesAnnotation.synchronizeWith(SourceNamedQueriesAnnotation.java:52)
	at org.eclipse.jpt.core.internal.resource.java.source.SourcePersistentMember.addOrSyncAnnotation_(SourcePersistentMember.java:349)

Reproducible: Always

Steps to Reproduce:
The NPE appears for code @NamedQueries(@NamedQuer)
Comment 1 Karen Butzke CLA 2010-08-23 11:49:02 EDT
Created attachment 177232 [details]
proposed patch for 2.3 maintenance

A simple null check and a test case specific to NamedQueries annotation
Comment 2 Karen Butzke CLA 2010-08-23 13:09:39 EDT
fixed for 2.3.2