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 245734 - Remove statement hint removes preceding line comments
Summary: Remove statement hint removes preceding line comments
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-16 14:24 UTC by Jiri Prox
Modified: 2016-08-11 01:56 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 Jiri Prox 2014-07-16 14:24:26 UTC
Remove statement hint (remove printStackTrace or System.out) should not remove preceding line comment. It may contain commented out code.

Example:
have a code:

    public void method(Throwable t) throws FileNotFoundException {
        //commented out code
        //commented out code
        //commented out code
        //commented out code
        t.printStackTrace();
        
    }

use hint - remove statement

result:
    public void method(Throwable t) throws FileNotFoundException {
    }
Comment 1 Svata Dedic 2015-10-02 15:50:20 UTC
Defect.
Comment 2 Svata Dedic 2016-08-09 16:08:41 UTC
Will be fixed by jet-main#19cbdbedf3a5
Comment 3 Quality Engineering 2016-08-11 01:56:20 UTC
Integrated into 'main-silver', will be available in build *201608110002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/19cbdbedf3a5
User: Svata Dedic <sdedic@netbeans.org>
Log: #245734: retained comments after deleted statements