jdk-24/test/langtools/tools/javac/lint/SomeVbc.java
2020-12-24 17:32:25 +00:00

32 lines
503 B
Java

/* /nodynamiccopyright/ */
package java.lang;
@jdk.internal.ValueBased
public final class SomeVbc {
public SomeVbc() {}
final String ref = "String";
void abuseVbc() {
synchronized(ref) { // OK
synchronized (this) { // WARN
}
}
}
}
final class AuxilliaryAbuseOfVbc {
void abuseVbc(SomeVbc vbc) {
synchronized(this) { // OK
synchronized (vbc) { // WARN
}
}
}
}