assdfsdafasfa opened a new issue, #8301:
URL: https://github.com/apache/netbeans/issues/8301
### Apache NetBeans version
Apache NetBeans 25
### What happened
When the "Pull Down Field" refactoring is performed using NetBeans, it
causes changes to the code's behavior.
### Language / Project Type / NetBeans Component
_No response_
### How to reproduce
Code before refactoring:
```java
class A extends C {
}
class B {
void main() {
final int b = 2;
new A() {
void m() {
System.out.println(b);
}
};
}
}
class C {
protected final int b = 1;
}
```
Code after refactoring:
```java
class A extends C {
protected final int b = 1;
}
class B {
void main() {
final int b = 2;
new A() {
void m() {
System.out.println(b);
}
};
}
}
class C {
}
```
The output before code refactoring is 1, and the output after refactoring is
2. The code behavior has changed.
### Did this work correctly in an earlier version?
Apache NetBeans 25
### Operating System
windows11
### JDK
17
### Apache NetBeans packaging
Apache NetBeans platform
### Anything else
_No response_
### Are you willing to submit a pull request?
No
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists