Skip to main content

Please review addition to fix 6806493 - exception in "Create Report" dialog

5 replies [Last post]
fda
Offline
Joined: 2005-05-27

New problem found in the Create Report dialog while verifying the fix: IOOB Exception when check box is clicked with Ctrl pressed.

Fix is trivial: just do nothing if no list element is currently selected.
https://jtharness.dev.java.net/source/browse/jtharness?rev=1449&view=rev

The same change for the case when Ctrl-Space is pressed
https://jtharness.dev.java.net/source/browse/jtharness?rev=1450&view=rev

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
bkurotsu
Offline
Joined: 2004-12-13

Sorry to be annoying, but I found another problem during testing. I pressed Alt while selecting the choices in the list - I was on a Mac though, not SURE it was ALT. But I think you can see the problem from the stack trace. I can retest when you add protection.

Exception in thread "AWT-EventQueue-0" java.lang.NumberFormatException: For input string: "?"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
at java.lang.Integer.parseInt(Integer.java:447)
at java.lang.Integer.parseInt(Integer.java:497)
at com.sun.javatest.exec.NewReportDialog$2.actionPerformed(NewReportDialog.java:361)
at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1576)

fda
Offline
Joined: 2005-05-27

I cannot reproduce the exception. I put Integer.parseInt() into try-catch block. Should cure.

fda
Offline
Joined: 2005-05-27
bkurotsu
Offline
Joined: 2004-12-13

Tested, no exceptions. :)

Looks good, please integrate to trunk.

fda
Offline
Joined: 2005-05-27

integrated