[java] Don't set protected visibility for final classes in override/implement chooser

#IDEA-364331 Fixed

GitOrigin-RevId: f3ac6ff3e423b23681f92b1ccc92727b0e06fad3
This commit is contained in:
Bart van Helvert
2025-01-09 15:28:48 +01:00
committed by intellij-monorepo-bot
parent 341758ee1c
commit 4e204e68ba
4 changed files with 52 additions and 2 deletions

View File

@@ -0,0 +1,34 @@
public class Parent {
protected Parent(int x) { }
}
final class Derived extends Parent {
Derived(int x) {
super(x);
}
@Override
public int hashCode() {
return super.hashCode();
}
@Override
public boolean equals(Object obj) {
return super.equals(obj);
}
@Override
protected Object clone() throws CloneNotSupportedException {
return super.clone();
}
@Override
public String toString() {
return super.toString();
}
@Override
protected void finalize() throws Throwable {
super.finalize();
}
}