diff options
Diffstat (limited to 'usage_examples/SynchronizedExample_post.jpage')
-rw-r--r-- | usage_examples/SynchronizedExample_post.jpage | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/usage_examples/SynchronizedExample_post.jpage b/usage_examples/SynchronizedExample_post.jpage index 858bfbde..219ab88a 100644 --- a/usage_examples/SynchronizedExample_post.jpage +++ b/usage_examples/SynchronizedExample_post.jpage @@ -1,7 +1,7 @@ public class SynchronizedExample { private static final Object $LOCK = new Object[0]; private final Object $lock = new Object[0]; - private final Object myLock = new Object(); + private final Object readLock = new Object(); public static void hello() { synchronized($LOCK) { @@ -16,7 +16,7 @@ public class SynchronizedExample { } public void foo() { - synchronized(myLock) { + synchronized(readLock) { System.out.println("bar"); } } |