-
Notifications
You must be signed in to change notification settings - Fork 922
Synzhronized modifier in generated overriden method #9294
Copy link
Copy link
Closed
Labels
Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)kind:bugBug report or fixBug report or fix
Description
Apache NetBeans version
Apache NetBeans 29
What happened
Overriding method with synchronized modifier in subclass using code completion feature (Ctrl + Space) generates wrong code. Instead of "synchronized" keyword, the "synchronized_or_acc_super" is generated.
Language / Project Type / NetBeans Component
Java Application
How to reproduce
private static class C1 {
synchronized void m1() {
}
}
private static class C2 extends C1 {
@Override
synchronized_or_acc_super void m1() {
super.m1(); // Generated from nbfs://nbhost/SystemFileSystem/Templates/Classes/Code/OverriddenMethodBody
}
}
Did this work correctly in an earlier version?
Apache NetBeans 28
Operating System
Ubuntu 24.04
JDK
25.0.2; OpenJDK 64-Bit Server VM 25.0.2+10-LTS
Apache NetBeans packaging
Community provided installer
Anything else
No response
Are you willing to submit a pull request?
No
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Java[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)[ci] enable extra Java tests (java.completion, java.source.base, java.hints, refactoring.java, form)kind:bugBug report or fixBug report or fix