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 267662

Summary: change of method parameters
Product: ide Reporter: henri127 <henri127>
Component: CodeAssignee: issues@ide <issues>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.1   
Hardware: PC   
OS: Windows 10   
Issue Type: DEFECT Exception Reporter:

Description henri127 2016-08-21 16:40:04 UTC
Product Version = NetBeans IDE 8.1 (Build 201510222201)
Operating System = Windows 10 version 10.0 running on amd64
Java; VM; Vendor = 1.8.0_72
Runtime = Java HotSpot(TM) 64-Bit Server VM 25.72-b15

Reproducibility: Happens every time

STEPS:
  * Open dialog Foo
  * Click on button "Click me"

ACTUAL:
  nothing happens

EXPECTED:
  message pops up

Consider a superclass with a function:

public class SuperClass {
    public void function(int a, int b) {
        
    }
}

and an inherited class which overwrites function:

public class InheritedClass extends SuperClass {
    @Override
    public void function(int a, int b) {
        super.function(a, b);
    }

}

When applying "Refactoring" command with "Change method paramters..." on function from definition as in SuperClass and changing the order of parameters a and b, this will result in

public class SuperClass {
    public void function(int b, int a) {
        
    }
}

for SuperClass and for InheritedClass:

public class InheritedClass extends SuperClass {
    @Override
    public void function(int b, int a) {
        super.function(a, b);
    }

}

Which means that the parameters exchange of a and b is not applied in the call to super.function(a, b) in function of inherited class