Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 356694

Summary: [change method signature] adding parameter introduces a compilation error: Cannot reduce the visibility of the inherited method from
Product: [Eclipse Project] JDT Reporter: Gustavo Soares <gsoares>
Component: UIAssignee: JDT-UI-Inbox <jdt-ui-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: normal    
Priority: P3 CC: markus.kell.r
Version: 3.8   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Gustavo Soares CLA 2011-09-04 18:59:55 EDT
Build Identifier: 20110615-0604

The change method signature refactoring introduce a compilation error while adding a parameter to a method. 

Reproducible: Always

Steps to Reproduce:
1. Create the classes
public class A {
  protected long k() {
    return 0;
  }
}
public class B extends A {
  private long k(long l) {
    return 2;
  }
}
2. Apply the Change Method Signature to add a parameter to k()
public class A {
  protected long k(long l) {
    return 0;
  }
}
public class B extends A {
  private long k(long l) {
    return 2;
  }
}
3. The resulting code does not compile
Comment 1 Markus Keller CLA 2011-09-05 12:53:29 EDT

*** This bug has been marked as a duplicate of bug 58616 ***