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 64998 - IllegalArgumentException on annotation with parameter
Summary: IllegalArgumentException on annotation with parameter
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-23 14:28 UTC by Martin Adamek
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception log (4.51 KB, text/plain)
2005-09-23 14:30 UTC, Martin Adamek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Adamek 2005-09-23 14:28:38 UTC
Steps to reproduce:
1) create new class
2) add following annotation in front of class definition:
@SuppressWarnings(value={"aaa"})
3) fix import for annotation type
4) insert space before "=" like this:
@SuppressWarnings(value ={"aaa"})
and wait for second
5) get exception
After closing exception it comes back immediately
Comment 1 Martin Adamek 2005-09-23 14:30:28 UTC
Created attachment 25106 [details]
Exception log
Comment 2 Tomas Hurka 2005-09-23 14:39:56 UTC
Already fixed in trunk.

/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/SemiPersistentElement.java
----------------------------
revision 1.75
date: 2005/09/15 07:47:53;  author: thurka;  state: Exp;  lines: +5 -0
missing AnnotationValueInfo cases added to findElement()
Comment 3 Martin Adamek 2005-09-23 14:57:12 UTC
Thanks, it's fixed. I've got something new:
with same scenario after step 4 delete inserted space and press Ctrl+S, you will
get:
[org.netbeans.javacore] INFORMATIONAL *********** Exception occurred
************ at 3:54 PM on Sep 23, 2005
java.lang.RuntimeException: Inconsistent storage. (mdrList.size == 0, infos.size
== 1)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.SemiPersistentElement.fixMembers(SemiPersistentElement.java:548)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.SemiPersistentElement.createChildrenList(SemiPersistentElement.java:916)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.AnnotationImpl.initChildren(AnnotationImpl.java:257)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.AnnotationImpl.getTypeName(AnnotationImpl.java:133)
        at org.netbeans.jmi.javamodel.Annotation$Impl.getTypeName(Unknown Source)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.AnnotationImpl.getChildren(AnnotationImpl.java:174)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.ElementFinder.getElementByOffset(ElementFinder.java:40)
        at
org.netbeans.modules.javacore.jmiimpl.javamodel.ResourceImpl.getElementByOffset(ResourceImpl.java:1642)
        at
org.netbeans.modules.java.hints.JavaHintsProvider.getHints(JavaHintsProvider.java:121)
        at
org.netbeans.modules.editor.hints.HintsOperator$HintPopupTaskImpl.run(HintsOperator.java:233)
        at org.openide.util.Task.run(Task.java:207)
        at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:469)
        at
org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:870)
Comment 4 Martin Adamek 2005-09-23 14:58:19 UTC
Milestone changed by mistake, changing back to 5.0
Comment 5 Max Sauer 2007-02-14 17:28:14 UTC
This has become obsolete with interduction of Retouche, work OK now. Marking as
Verified.
---
NetBeans IDE Dev (Build 070214)
1.6.0; Java HotSpot(TM) Server VM 1.6.0-b105
Linux version 2.6.12-1.1390_FC4smp running on i386
en_US (nb); UTF-8
Comment 6 Quality Engineering 2007-09-20 12:10:57 UTC
Reorganization of java component