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 231471 - Appliying hint over non compilable code caused code duplication
Summary: Appliying hint over non compilable code caused code duplication
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.4
Hardware: All All
: P2 normal (vote)
Assignee: Jan Lahoda
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-18 19:49 UTC by ecerichter
Modified: 2013-07-01 15:58 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log (111.32 KB, text/plain)
2013-06-18 19:49 UTC, ecerichter
Details
Code duplication video (1.52 MB, application/octet-stream)
2013-06-18 19:50 UTC, ecerichter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ecerichter 2013-06-18 19:49:04 UTC
Product Version = NetBeans IDE Dev (Build 201306162301)
Operating System = Windows 7 version 6.1 running on amd64
Java; VM; Vendor = 1.7.0_21
Runtime = Java HotSpot(TM) 64-Bit Server VM 23.21-b01

I've a Java source code that contains syntax error and is not compilable.
I do select the hint "Organize members" and then NetBeans duplicate entire blocks of code.
I think that if there is syntax error, the organize members should not even be evaluated (how to know if all necessary } is in place?).
See attached video for reference.

Thanks,

Edson
Comment 1 ecerichter 2013-06-18 19:49:10 UTC
Created attachment 135993 [details]
IDE log
Comment 2 ecerichter 2013-06-18 19:50:18 UTC
Created attachment 135994 [details]
Code duplication video
Comment 3 Jan Lahoda 2013-07-01 08:10:22 UTC
Fixed:
http://hg.netbeans.org/main-silver/rev/276a0081c0bb
Comment 4 Quality Engineering 2013-07-01 15:58:31 UTC
Integrated into 'main-silver', will be available in build *201307011244* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/276a0081c0bb
User: Jan Lahoda <jlahoda@netbeans.org>
Log: #231471: disabling organize imports when the source code contains syntax errors.