commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kohs...@apache.org
Subject svn commit: r240002 - /jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/Stack.java
Date Thu, 25 Aug 2005 06:00:18 GMT
Author: kohsuke
Date: Wed Aug 24 23:00:14 2005
New Revision: 240002

URL: http://svn.apache.org/viewcvs?rev=240002&view=rev
Log:
used isDebugEnabled to avoid unnecessary computation

Modified:
    jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/Stack.java

Modified: jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/Stack.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/Stack.java?rev=240002&r1=240001&r2=240002&view=diff
==============================================================================
--- jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/Stack.java
(original)
+++ jakarta/commons/sandbox/javaflow/trunk/src/java/org/apache/commons/javaflow/bytecode/Stack.java
Wed Aug 24 23:00:14 2005
@@ -142,10 +142,12 @@
         final Object o = ostack[--oTop];
         ostack[oTop]=null;  // avoid unnecessary reference to object
 
-        final String clazz = getClassName(o);
-        final String clazzLoader = getClassLoaderName(o);
-        
-        log.debug("pop object "+ clazz + "/" + clazzLoader + " [" + o + "] " + toString());
+        if(log.isDebugEnabled()) {
+            final String clazz = getClassName(o);
+            final String clazzLoader = getClassLoaderName(o);
+
+            log.debug("pop object "+ clazz + "/" + clazzLoader + " [" + o + "] " + toString());
+        }
         
         return o;
     }
@@ -162,10 +164,12 @@
         final Object o = rstack[--rTop];
         rstack[rTop]=null;  // avoid unnecessary reference to object
 
-        final String clazz = getClassName(o);
-        final String clazzLoader = getClassLoaderName(o);
-        
-        log.debug("pop reference "+ clazz + "/" + clazzLoader + " [" + o + "] " + toString());
+        if(log.isDebugEnabled()) {
+            final String clazz = getClassName(o);
+            final String clazzLoader = getClassLoaderName(o);
+
+            log.debug("pop reference "+ clazz + "/" + clazzLoader + " [" + o + "] " + toString());
+        }
         
         return o;
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message