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 - change of method parameters
Summary: change of method parameters
Status: NEW
Alias: None
Product: ide
Classification: Unclassified
Component: Code (show other bugs)
Version: 8.1
Hardware: PC Windows 10
: P3 normal (vote)
Assignee: issues@ide
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-21 16:40 UTC by henri127
Modified: 2016-08-21 16:40 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 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