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 192561 - [70cat][hints] Meaningless hints for missing Open brace on if statement when declaring a variable.
Summary: [70cat][hints] Meaningless hints for missing Open brace on if statement when ...
Status: RESOLVED FIXED
Alias: None
Product: editor
Classification: Unclassified
Component: Hints & Annotations (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-27 04:12 UTC by esmithbss
Modified: 2010-12-02 08:45 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 esmithbss 2010-11-27 04:12:09 UTC
Product Version = NetBeans IDE Dev (Build 201011250001)
Operating System = Windows XP version 5.1 running on x86
Java; VM; Vendor = 1.6.0_20
Runtime = Java HotSpot(TM) Client VM 16.3-b01

If the user misses an opening brace ('{') on an if statement, the hints that are provided are useless to the user.

Ex:  If in a method, the developer types the following:

    if ( name != null )
      String normalized = name.trim().toUpperCase();
      
The line beginning with "String normalized" is marked as erroneous and the hints that are provided are:

     Create Field normalized in <class>
     Create Parameter normalized
     Create Local Variable normalized

None of which indicate the lack of the preceeding '{' which is the actual cause of the error.
Comment 1 Quality Engineering 2010-12-02 06:23:38 UTC
Integrated into 'main-golden', will be available in build *201012020001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/65e1689f9eb3
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #192561: updating nb-javac library - new version improves error recovery of 'if () <variable-declaration>'
Comment 2 Jan Lahoda 2010-12-02 08:45:10 UTC
The hints are not proposed after the above fix and a customized compile error is reported.