changeset 14750:7b3ee54233ea

fixed findbugs issue
author Doug Simon <doug.simon@oracle.com>
date Tue, 25 Mar 2014 23:52:57 +0100
parents 0b6ec715a291
children 015f84f0b375
files graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Tue Mar 25 22:38:07 2014 +0100
+++ b/graal/com.oracle.graal.compiler/src/com/oracle/graal/compiler/gen/LIRGenerator.java	Tue Mar 25 23:52:57 2014 +0100
@@ -530,6 +530,8 @@
         return null;
     }
 
+    private static final Object LOG_OUTPUT_LOCK = new Object();
+
     /**
      * Try to find a sequence of Nodes which can be passed to the backend to look for optimized
      * instruction sequences using memory. Currently this basically is a read with a single
@@ -572,7 +574,7 @@
                         }
                     }
                     if (Debug.isLogEnabled()) {
-                        synchronized ("lock") {  // Hack to ensure the output is grouped.
+                        synchronized (LOG_OUTPUT_LOCK) {  // Hack to ensure the output is grouped.
                             try (Indent indent = Debug.logAndIndent("checking operations")) {
                                 int start = nodes.indexOf(access);
                                 int end = nodes.indexOf(operation);