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 227544 - Remove @Override Annotation indents method signature
Summary: Remove @Override Annotation indents method signature
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Hints (show other bugs)
Version: 7.3
Hardware: PC Windows 7
: P4 normal (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-16 05:38 UTC by MackSix
Modified: 2016-07-23 06:12 UTC (History)
2 users (show)

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 MackSix 2013-03-16 05:38:17 UTC
Using the Remove @Override Annotation causes the method signature to be indented.

For example in this class, the last "doStuff" method is an overload instead of an override and the hints show an error light bulb and has an option to remove the annotation.

public class NewClass implements NewInterface {

    @Override
    public void doStuff() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
    @Override
    public void doStuff(Object o) {
        throw new UnsupportedOperationException("Not supported yet.");
    }
}

After the annotation is removed, this is the result:

public class NewClass implements NewInterface {

    @Override
    public void doStuff() {
        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
    }
    
        public void doStuff(Object o) { // <-- ***Unwanted indentation***
        throw new UnsupportedOperationException("Not supported yet.");
    }
}

Product Version: NetBeans IDE 7.3 (Build 201302132200)
Java: 1.7.0_17; Java HotSpot(TM) 64-Bit Server VM 23.7-b01
Runtime: Java(TM) SE Runtime Environment 1.7.0_17-b02
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Martin Balin 2016-07-07 07:18:48 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 2 MackSix 2016-07-23 06:12:30 UTC
Verified Fixed in:

Product Version: NetBeans IDE Dev (Build 201607220002)
Java: 1.8.0_92; Java HotSpot(TM) 64-Bit Server VM 25.92-b14
Runtime: Java(TM) SE Runtime Environment 1.8.0_92-b14
System: Windows 7 version 6.1 running on amd64; UTF-8; en_US (nb