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 161217 - [67cat]IllegalArgumentException: setSelectedIndex: 0 out of bounds
Summary: [67cat]IllegalArgumentException: setSelectedIndex: 0 out of bounds
Status: RESOLVED FIXED
Alias: None
Product: connecteddeveloper
Classification: Unclassified
Component: Bugzilla (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Stupka
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-26 08:41 UTC by rajivderas
Modified: 2009-07-27 09:20 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 148290


Attachments
stacktrace (785 bytes, text/plain)
2009-03-26 08:41 UTC, rajivderas
Details
stacktrace (785 bytes, text/plain)
2009-03-26 08:42 UTC, rajivderas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description rajivderas 2009-03-26 08:41:03 UTC
Build: NetBeans IDE Dev (Build 200903250219)
VM: OpenJDK Client VM, 14.0-b10, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b01
OS: Windows XP, 5.1, x86

User Comments:
rajivderas: steps:
1) goto Team > report an issues in ide main menu
2) select report an issues and it will open a report issues ui in top component
3) click the hyperlink named 'new' which will prompt create repository dialog
4) under the bugzilla connector place the word 'test' under name,username and password form  fields and http://test under repository url
5) press ok button and it will display again the same dialog with the values displaying the message 'host not found'
6) repeat step five again and press cancel button and you will get a error message saying action canceled by user press ok
now you will get this exception



Stacktrace: 
java.lang.IllegalArgumentException: setSelectedIndex: 0 out of bounds
        at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:601)
        at org.netbeans.modules.bugzilla.issue.IssuePanel.reloadForm(IssuePanel.java:195)
        at org.netbeans.modules.bugzilla.issue.IssuePanel.setIssue(IssuePanel.java:164)
        at org.netbeans.modules.bugzilla.issue.IssueController.<init>(IssueController.java:58)
        at org.netbeans.modules.bugzilla.issue.BugzillaIssue.getController(BugzillaIssue.java:234)
        at org.netbeans.modules.bugtracking.ui.issue.IssueTopComponent$4.run(IssueTopComponent.java:280)
Comment 1 rajivderas 2009-03-26 08:41:08 UTC
Created attachment 78878 [details]
stacktrace
Comment 2 rajivderas 2009-03-26 08:42:04 UTC
Build: NetBeans IDE Dev (Build 200903250219)
VM: OpenJDK Client VM, 14.0-b10, Java(TM) SE Runtime Environment, 1.6.0_14-ea-b01
OS: Windows XP, 5.1, x86

User Comments: 
steps:
1) goto Team > report an issues in ide main menu
2) select report an issues and it will open a report issues ui in top component
3) click the hyperlink named 'new' which will prompt create repository dialog
4) under the bugzilla connector place the word 'test' under name,username and password form  fields and http://test under repository url
5) press ok button and it will display again the same dialog with the values displaying the message 'host not found'
6) repeat step five again and press cancel button and you will get a error message saying action canceled by user press ok
now you will get this exception 

Stacktrace: 
java.lang.IllegalArgumentException: setSelectedIndex: 0 out of bounds
        at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:601)
        at org.netbeans.modules.bugzilla.issue.IssuePanel.reloadForm(IssuePanel.java:195)
        at org.netbeans.modules.bugzilla.issue.IssuePanel.setIssue(IssuePanel.java:164)
        at org.netbeans.modules.bugzilla.issue.IssueController.<init>(IssueController.java:58)
        at org.netbeans.modules.bugzilla.issue.BugzillaIssue.getController(BugzillaIssue.java:234)
        at org.netbeans.modules.bugtracking.ui.issue.IssueTopComponent$4.run(IssueTopComponent.java:280)
Comment 3 rajivderas 2009-03-26 08:42:08 UTC
Created attachment 78879 [details]
stacktrace
Comment 4 Jan Stola 2009-03-27 17:24:19 UTC
Reassigning back to tstupka.

Tomas, I believe that this is yours. IssuePanel throws this exception because the given issue is invalid e.g. it 
corresponds to invalid BugzillaRepository. IMHO such an issue shouldn't be passed to IssuePanel. IssuePanel cannot do 
anything reasonable with it. The IssuePanel shouldn't be shown for such an invalid selection. Look at 
IssueTopComponent.onRepoSelected(). It would be (probably) sufficient to modify BugzillaRepository.createIssue() to 
return null if the repository is invalid (or it cannot be reached).
Comment 5 Tomas Stupka 2009-04-07 20:41:57 UTC
fixed

changeset   : 125618:b1a7e1148aeb
author      : Tomas Stupka <tstupka@netbeans.org>
date        : Tue Apr 07 21:41:27 CEST 2009
Comment 6 Quality Engineering 2009-04-09 19:32:58 UTC
Integrated into 'main-golden', will be available in build *200904091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b1a7e1148aeb
User: Tomas Stupka <tstupka@netbeans.org>
Log: #161217 - [67cat]IllegalArgumentException: setSelectedIndex: 0 out of bounds