jdk
1/* /nodynamiccopyright/ */
2
3package java.lang;
4
5@jdk.internal.ValueBased
6public final class SomeVbc {
7
8public SomeVbc() {}
9
10final String ref = "String";
11
12void abuseVbc() {
13
14synchronized(ref) { // OK
15synchronized (this) { // WARN
16}
17}
18}
19}
20
21final class AuxilliaryAbuseOfVbc {
22
23void abuseVbc(SomeVbc vbc) {
24
25synchronized(this) { // OK
26synchronized (vbc) { // WARN
27}
28}
29}
30}
31
32