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 131826

Summary: IllegalStateException: ' @author felenda Long Comment LongComment Long Comment Long Comment Long Comment Long Comment Long Comment Long Comment Long Comment Long Comment Long Comment Long Comment
Product: java Reporter: pribyl <pribyl>
Component: JavadocAssignee: issues@editor <issues>
Status: VERIFIED FIXED    
Severity: blocker CC: gaxzero, gtzabari, jiriprox, jungi, mentlicher, mgoe, rbrink, sdvic, sustaining
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
URL: http://statistics.netbeans.org/exceptions/detail.do?id=42836
Issue Type: DEFECT Exception Reporter: 42836
Attachments: ide log

Description pribyl 2008-04-02 13:44:27 UTC
Build: NetBeans IDE Dev (Build 200804020122)
VM: Java HotSpot(TM) Client VM, 11.0-b11, Java(TM) SE Runtime Environment, 1.6.0_10-beta-b14
OS: Windows XP, 5.1, x86
User comments: Exception was thrown, when I selected and dragged part of a code from one place to another
(it was part of a javadoc, specifically the '@author' text

More info & Steps to reproduce
1, Open some file with javadoc comment, including @author 
2, Select the whole line (even with the space and * in front of it)
3, Move it (either by mouse or Cut&Paste) to the first line of the comment, so the whole javadoc will look like this:

/** * @author someone
 *

 *
 */

I admit it was caused by non-standart user behaviour, so to speak :) So P3 may be quite high for this. But I am not sure
whether it is not some more important problem, than it seems to be, so please feel free to lower the priority if it is
really some minor issue. Thx.
Comment 1 Jiri Prox 2008-04-02 14:22:37 UTC
java.lang.NullPointerException
	at org.netbeans.modules.java.editor.javadoc.DocPositions.resolve(DocPositions.java:189)
Caused: java.lang.IllegalStateException: '@author vs157455

'
org.netbeans.modules.java.editor.javadoc.DocPositions@1132b21
token sequence dump: T[0]: "* " <131,133> OTHER_TEXT[5] DefT, IHC=2635236
T[1]: "@author" <133,140> TAG[1] DefT, IHC=32129320
T[2]: " " <140,141> OTHER_TEXT[5] DefT, IHC=6012305
T[3]: "vs157455" <141,149> IDENT[0] DefT, IHC=16415955
*[4]: "\n *\n " <149,154> OTHER_TEXT[5] DefT, IHC=18420373

	at org.netbeans.modules.java.editor.javadoc.DocPositions.resolve(DocPositions.java:196)
	at org.netbeans.modules.java.editor.javadoc.DocPositions.getTags(DocPositions.java:129)
	at org.netbeans.modules.java.editor.javadoc.JavadocImports.computeReferencedElements(JavadocImports.java:115)
	at
org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.handleJavadoc(SemanticHighlighter.java:686)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitClass(SemanticHighlighter.java:1218)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitClass(SemanticHighlighter.java:410)
	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:605)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:91)
	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:90)
	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:100)
	at
org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitCompilationUnit(SemanticHighlighter.java:744)
	at
org.netbeans.modules.java.editor.semantic.SemanticHighlighter$DetectorVisitor.visitCompilationUnit(SemanticHighlighter.java:410)
	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:483)
	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:67)
	at org.netbeans.api.java.source.support.CancellableTreePathScanner.scan(CancellableTreePathScanner.java:91)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:250)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.process(SemanticHighlighter.java:227)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:176)
	at org.netbeans.modules.java.editor.semantic.SemanticHighlighter.run(SemanticHighlighter.java:130)
	at org.netbeans.api.java.source.JavaSource$CompilationJob.run(JavaSource.java:1661)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[catch] at java.lang.Thread.run(Thread.java:619)
Comment 2 Jan Pokorsky 2008-04-02 16:17:20 UTC
Not nice but it is a corner case IMO. The javadoc tool seems to resolve ' * @author' as a block tag which is wrong. For
other than first line it works properly.
Comment 3 Jan Pokorsky 2008-04-02 19:05:05 UTC
fixed as http://hg.netbeans.org/main/rev/1a8ee9f0a7e0
Comment 4 Jiri Prox 2008-04-16 09:01:44 UTC
*** Issue 132927 has been marked as a duplicate of this issue. ***
Comment 5 Jan Pokorsky 2008-04-29 13:41:24 UTC
*** Issue 134122 has been marked as a duplicate of this issue. ***
Comment 6 Jan Pokorsky 2008-04-29 13:44:21 UTC
Jirko, this is a perfect candidate for release61 patch IMO.
Comment 7 Lukas Jungmann 2008-05-04 15:20:39 UTC
still reproducible ie with following class-level javadoc in full ide build:

/**
 * some text
 * 
 ** @author lukas
 */
public class Some {}

other repro-case - open org.openide.WizardDescTest in the editor (Dialogs API module) which contains:

/** Testing behaviour of WizardDescription in order to fix bug 35266
 ** @see issue 35266
 */

INFO:
Product Version: NetBeans IDE Dev (Build 20080503171657)
Java: 1.6.0_06; Java HotSpot(TM) Client VM 10.0-b22
System: Linux version 2.6.24-17-generic running on i386; UTF-8; en_US (nb)
Comment 8 Lukas Jungmann 2008-05-04 15:26:39 UTC
Created attachment 61024 [details]
ide log
Comment 9 Jan Pokorsky 2008-05-15 12:28:52 UTC
It is slightly different problem. It seems that javadoc tool parser accepts several '*' as a javadoc line prefix.

Fixed as http://hg.netbeans.org/main/rev/02d5b7adb434
Comment 10 Quality Engineering 2008-05-20 05:12:33 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #206 build
Changeset: http://hg.netbeans.org/main/rev/02d5b7adb434
User: Jan Pokorsky <jpokorsky@netbeans.org>
Log: #131826: whatever javadoc line may be prefixed with several *
Comment 11 Lukas Jungmann 2008-05-29 12:00:41 UTC
v.
Comment 12 pgebauer 2008-05-29 21:37:41 UTC
The fix has been ported into the release61_fixes branch:

http://hg.netbeans.org/release61_fixes/rev/22963806b379
Comment 13 pribyl 2008-06-23 15:30:12 UTC
Verified
Comment 14 Jan Pokorsky 2009-04-22 09:20:51 UTC
Just for the record: duplicates from the automatic reporter with build number newer than 080421 belongs to issue 139147.