This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 50895 - [40cat] NPE when creating an annotation
Summary: [40cat] NPE when creating an annotation
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Pavel Flaska
URL:
Keywords: REGRESSION
: 51195 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-10-27 12:23 UTC by skesper
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception (2.35 KB, text/plain)
2004-11-02 12:26 UTC, Marek Grummich
Details

Note You need to log in before you can comment on or make changes to this bug.
Description skesper 2004-10-27 12:23:12 UTC
[ BUILD # : 200410261800 ]
[ JDK VERSION : J2SE 1.5.0 ]

Created a new class. Defined an annotation type

public @interface Copyright
{
    String value;
}

and used the 

@copyright("Message") 

as annotation for the class. 

Got the following NPE:

Annotation: Exception occurred in Request Processor
java.lang.NullPointerException
	at
org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:699)
	at
org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:276)
	at
org.netbeans.modules.javacore.parser.MDRParser.getModifiers(MDRParser.java:1284)
	at
org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:431)
	at
org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:336)
	at
org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:298)
	at
org.netbeans.modules.javacore.parser.MDRParser.processAST(MDRParser.java:276)
	at
org.netbeans.modules.javacore.parser.MDRParser.enterMembers(MDRParser.java:207)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.directUpdate(ResourceImpl.java:640)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.checkUpToDate(ResourceImpl.java:553)
	at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.updateFromDataObject(ResourceImpl.java:390)
	at
org.netbeans.modules.javacore.ExclusiveMutex.parseIfNeeded(ExclusiveMutex.java:236)
	at
org.netbeans.modules.javacore.ExclusiveMutex.enter(ExclusiveMutex.java:150)
	at
org.netbeans.mdr.NBMDRepositoryImpl.beginTrans(NBMDRepositoryImpl.java:227)
	at
org.netbeans.modules.java.JavaEditor$2.run(JavaEditor.java:230)
	at org.openide.util.Task.run(Task.java:136)
	at
org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:330)
[catch] at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:686)
Comment 1 Marek Grummich 2004-10-27 12:53:22 UTC
I am able to reproduce it and seems to me it worked in the last. 
Priority P3->P2!
Thanks!
Comment 2 Martin Matula 2004-10-27 13:02:30 UTC
Dane, please look at it.
Comment 3 Pavel Flaska 2004-10-28 11:35:42 UTC
Fixed in trunk. There was problem when source contained syntax errors
and there were features/classes with annotation. The same problem was
visible when using 1.4 platform and having 1.5 sources. All these
cases should work correctly now.

Checking in src/org/netbeans/modules/javacore/parser/ASTRepairer.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/ASTRepairer.java,v
 <--  ASTRepairer.java
new revision: 1.3; previous revision: 1.2
Comment 4 Pavel Flaska 2004-10-29 15:56:10 UTC
Merged to QBE200410261800.

Checking in
./javacore/src/org/netbeans/modules/javacore/parser/ASTRepairer.java;
/cvs/java/javacore/src/org/netbeans/modules/javacore/parser/ASTRepairer.java,v
 <--  ASTRepairer.java
new revision: 1.2.2.1; previous revision: 1.2
done
Comment 5 Marek Grummich 2004-11-02 12:23:58 UTC
Verified in the build 200411020931.
Note: The attached informational exception is thrown in the console. 
Comment 6 Marek Grummich 2004-11-02 12:26:48 UTC
Created attachment 18666 [details]
Exception
Comment 7 Martin Matula 2004-11-09 09:39:44 UTC
*** Issue 51195 has been marked as a duplicate of this issue. ***
Comment 8 Quality Engineering 2007-09-20 12:05:47 UTC
Reorganization of java component