mirror of
https://github.com/tiennm99/lombok.git
synced 2026-10-14 04:16:19 +00:00
Fixed the test code for Synchronized
This commit is contained in:
1 parent
96c122a267
commit
8d9b4fdaca
2 files changed
+6
-6
No files matched your search
@@ -1,5 +1,4 @@
|
||||
class SynchronizedPlain1 {
|
||||
private final Object $lock = new Object[0];
|
||||
void test() {
|
||||
synchronized ($lock) {
|
||||
System.out.println("one");
|
||||
@@ -10,9 +9,9 @@ class SynchronizedPlain1 {
|
||||
System.out.println("two");
|
||||
}
|
||||
}
|
||||
private final java.lang.Object $lock = new java.lang.Object[0];
|
||||
}
|
||||
class SynchronizedPlain2 {
|
||||
private static final Object $LOCK = new Object[0];
|
||||
static void test() {
|
||||
synchronized ($LOCK) {
|
||||
System.out.println("three");
|
||||
@@ -23,4 +22,5 @@ class SynchronizedPlain2 {
|
||||
System.out.println("four");
|
||||
}
|
||||
}
|
||||
private static final java.lang.Object $LOCK = new java.lang.Object[0];
|
||||
}
|
||||
@@ -1,17 +1,17 @@
|
||||
import lombok.Synchronized;
|
||||
class SynchronizedPlain1 {
|
||||
@lombok.Synchonized void test() {
|
||||
@lombok.Synchronized void test() {
|
||||
System.out.println("one");
|
||||
}
|
||||
@Synchonized void test2() {
|
||||
@Synchronized void test2() {
|
||||
System.out.println("two");
|
||||
}
|
||||
}
|
||||
class SynchronizedPlain2 {
|
||||
@lombok.Synchonized static void test() {
|
||||
@lombok.Synchronized static void test() {
|
||||
System.out.println("three");
|
||||
}
|
||||
@Synchonized static void test2() {
|
||||
@Synchronized static void test2() {
|
||||
System.out.println("four");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user