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 7974 - No field should be added into class, if it's name is invalid Java identifier
Summary: No field should be added into class, if it's name is invalid Java identifier
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 3.x
Hardware: PC Windows ME/2000
: P4 trivial (vote)
Assignee: issues@java
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2000-10-23 15:04 UTC by Jan Becicka
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Becicka 2000-10-23 15:04:08 UTC
[1128], JDK 1.3.0-C, W2k
Steps to reproduce:
1. Create new Field (popup New | Field)
2. In Name TextField type some invalid identifier (e.g. "my-field")
3. Press Enter
4. You'll get "The specified name is not a valid java identifier" message
5. There is new Field "newField" inserted into class -> but no field should be
added
Comment 1 Jan Becicka 2001-11-23 13:06:37 UTC
Bug still lives in [200111230645]
Comment 2 Jan Chalupa 2001-11-27 12:49:17 UTC
Target milestone -> 3.3.1.
Comment 3 Svata Dedic 2001-12-10 14:59:41 UTC
Will try to solve, although there's no clear distinction between
confirmed and cancelled operation since we depend on focus events.
Comment 4 Svata Dedic 2001-12-10 16:09:46 UTC
The problem is much worse on JDK-1.4: since the FocusLost event
arrives *after* the keyboard action (enter) has been processed, the
properties of the new field are *not* updated at all -- field with the
default "newField" name is always inserted on JDK-1.4, unless the user
moves the focus prior to confirming (or uses mouse to press OK button).

Fixed in trunk.
Comment 5 Svata Dedic 2001-12-10 17:24:07 UTC
Fixed also in 3.3 branch
Comment 6 Jan Becicka 2002-01-09 10:36:44 UTC
[200201090331] Verified
Comment 7 Quality Engineering 2003-07-01 13:17:34 UTC
Resolved for 3.4.x or earlier, no new info since then -> closing.