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 240707 - [Push Down] Problem with @Override (uncompilable code)
Summary: [Push Down] Problem with @Override (uncompilable code)
Status: RESOLVED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Refactoring (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Ralph Ruijs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-01-20 13:51 UTC by ssazonov
Modified: 2014-02-01 05:46 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Before / After (104.13 KB, image/png)
2014-01-20 13:51 UTC, ssazonov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ssazonov 2014-01-20 13:51:23 UTC
Created attachment 144153 [details]
Before / After

1. Create java class:

package test;

public class ClassA {

    public interface InterfaceA {

        public void m1();
    }

    private class ClassB implements InterfaceA {

        @Override
        public void m1() {
        }
    }

    private class ClassC extends ClassB {
    }
}

2. Put caret into ClassB, from main menu select Refactor > Push Down, check InterfaceA and press Refactor

>> It generates uncompilable code since "@Override" is not deleted (see attached image)

Product Version: NetBeans IDE Dev (Build 201401200001)
Java: 1.7.0_51; Java HotSpot(TM) 64-Bit Server VM 24.51-b03
Runtime: Java(TM) SE Runtime Environment 1.7.0_51-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 Ralph Ruijs 2014-01-30 12:47:57 UTC
changeset   : 69af6f139f28
author      : Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
date        : Thu Jan 30 13:41:57 CET 2014
summary     : #240707 - [Push Down] Problem with @Override (uncompilable code)
Comment 2 Quality Engineering 2014-02-01 05:46:50 UTC
Integrated into 'main-silver', will be available in build *201402010001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/69af6f139f28
User: Ralph Benjamin Ruijs <ralphbenjamin@netbeans.org>
Log: #240707 - [Push Down] Problem with @Override (uncompilable code)