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 12903 - CI: ClassCastException after set mnemonic as character
Summary: CI: ClassCastException after set mnemonic as character
Status: CLOSED FIXED
Alias: None
Product: guibuilder
Classification: Unclassified
Component: Code (show other bugs)
Version: 3.x
Hardware: All All
: P4 blocker (vote)
Assignee: Josef Kozak
URL:
Keywords:
: 12973 (view as bug list)
Depends on:
Blocks:
 
Reported: 2001-06-15 18:23 UTC by Marian Mirilovic
Modified: 2003-06-30 18:29 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
First exception write only to ide.log next set value 'd' (4.54 KB, text/plain)
2001-06-15 18:53 UTC, Marian Mirilovic
Details
Exception after invoke Property editor (6.69 KB, text/plain)
2001-06-15 18:55 UTC, Marian Mirilovic
Details
NullPointerException (1.63 KB, text/plain)
2001-06-19 09:31 UTC, Marian Mirilovic
Details
NumberFormatException (2.37 KB, text/plain)
2001-06-19 09:48 UTC, Marian Mirilovic
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Marian Mirilovic 2001-06-15 18:23:08 UTC
[nb_dev](211),[jdk1.3.1](rc1)

Steps to reproduce:
- open Jframe, add JPopupMenu, add JMenuItem
- try to set mnemonic, type "10" -> ok , value of property is changed to '\n'
- try to type 'k' -> new value is java.lang.ClassCastException

After invoke property editor you obtain ClassCastException (attachment)
Comment 1 Marian Mirilovic 2001-06-15 18:53:57 UTC
Created attachment 1598 [details]
First exception write only to ide.log next set value 'd'
Comment 2 Marian Mirilovic 2001-06-15 18:55:19 UTC
Created attachment 1599 [details]
Exception after invoke Property editor
Comment 3 Marian Mirilovic 2001-06-18 17:12:22 UTC
*** Issue 12973 has been marked as a duplicate of this issue. ***
Comment 4 Josef Kozak 2001-06-18 21:30:01 UTC
Now MnemonicEditor distinguishes between Integer and Character value because of 
new PropertySheet.

modified files:
MnemonicEditor.java, new revision 1.2

::: fixed in dev only
Comment 5 Josef Kozak 2001-06-18 21:48:06 UTC
Sorry for confusing:
1. OS and platform were changed by mistake
2. resolution "FIXED" is missing
Comment 6 Josef Kozak 2001-06-18 21:49:38 UTC
Now fields are correct.
Comment 7 Marian Mirilovic 2001-06-19 09:24:11 UTC
verified in [nb_dev](20010619)
Comment 8 Marian Mirilovic 2001-06-19 09:31:52 UTC
Created attachment 1632 [details]
NullPointerException
Comment 9 Marian Mirilovic 2001-06-19 09:46:53 UTC
 NullPointerException:
- open frame, set mnemonic (for JMenuItem)
- type 'h'
- close, reopen 
-> NPE - during opening (attachment)
-> mnemonic value is empty

NumberFormatException:
- open frame, set mnemonic ( for JMenuItem) 
- change editor type to IntEditor 
- try to type 'k'
-> NumberFormatException (attachment)

Form didn't remember used editor type:
- open frame, set mnemonic (for JMenuItem)
- change editor to IntEditor
- type 100
- save, reopen 
-> source code is right , but value of mnemonic is 'd' and selected editor is
MnemonicEditor
Comment 10 Marian Mirilovic 2001-06-19 09:48:43 UTC
Created attachment 1634 [details]
NumberFormatException
Comment 11 Josef Kozak 2001-06-19 11:26:15 UTC
NPE was caused by absence of converting char value to int.

modified files:
MnemonicEditor.java, new revision 1.3

NullPointerException: fixed
NumberFormatException: not matter of MnemonicEditor, EXC goes to ide.log only
Form didn't remember used editor type: it's OK, editors for primitive types are 
not written in form file

::: fixed in dev only
Comment 12 Marian Mirilovic 2001-06-20 08:47:17 UTC
verified in [nb_dev](20010620)
Comment 13 Quality Engineering 2003-06-30 18:29:24 UTC
Resolved for 3.3.x or earlier, no new info since then -> closing.