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 66584 - AutoComment: AIOOBE when pressing 'Move Down' with no tag selected
Summary: AutoComment: AIOOBE when pressing 'Move Down' with no tag selected
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Javadoc (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jan Pokorsky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-12 11:05 UTC by Max Sauer
Modified: 2005-10-19 08:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
exception stack trace (2.20 KB, text/plain)
2005-10-12 11:12 UTC, Max Sauer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Max Sauer 2005-10-12 11:05:31 UTC
Inside AutoComment tool, pressing of 'Move Down' button with no item selected
results in following AIOOBE:

java.lang.ArrayIndexOutOfBoundsException: -1
	at java.util.Vector.elementAt(Vector.java:435)
	at javax.swing.DefaultListModel.get(DefaultListModel.java:428)
	at
org.netbeans.modules.javadoc.comments.JavaDocEditorPanel.moveTagButtonActionPerformed(JavaDocEditorPanel.java:636)
	at
org.netbeans.modules.javadoc.comments.JavaDocEditorPanel.access$700(JavaDocEditorPanel.java:39)
...
(whole stack trace attached)

Steps to reproduce:
--------------------
1) Open Autocomment tool on a class with a method with more tags
2) Press 'Move Down'

--> Exception is thrown

[200510111800, JDK 1.5.0_05, solaris 10/sparc]
Comment 1 Max Sauer 2005-10-12 11:12:46 UTC
Created attachment 25851 [details]
exception stack trace
Comment 2 Jan Pokorsky 2005-10-17 16:36:49 UTC
fixed in

/cvs/javadoc/src/org/netbeans/modules/javadoc/comments/JavaDocEditorPanel.java
new revision: 1.58; previous revision: 1.57
Comment 3 Max Sauer 2005-10-19 08:28:18 UTC
Verified in [200510171800, JDK 1.5.0_05,linux x86] 

No exception is thrown anymore, but shouldn't 'Move Up/Down' be disabled when no
tag is selected?