You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by ja...@apache.org on 2012/05/19 08:18:08 UTC

svn commit: r1340347 - /ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java

Author: jacopoc
Date: Sat May 19 06:18:07 2012
New Revision: 1340347

URL: http://svn.apache.org/viewvc?rev=1340347&view=rev
Log:
Made the static variable Debug.dateFormat a private and final field because it is only used locally and DateFormat is not thread safe.

Modified:
    ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java

Modified: ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java?rev=1340347&r1=1340346&r2=1340347&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java (original)
+++ ofbiz/trunk/framework/base/src/org/ofbiz/base/util/Debug.java Sat May 19 06:18:07 2012
@@ -45,8 +45,6 @@ public final class Debug {
     public static final String noModuleModule = "NoModule";  // set to null for previous behavior
     public static final Object[] emptyParams = new Object[0];
 
-    static DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
-
     public static final String SYS_DEBUG = System.getProperty("DEBUG");
     public static final int ALWAYS = 0;
     public static final int VERBOSE = 1;
@@ -62,6 +60,8 @@ public final class Debug {
     public static final String[] levelProps = {"", "print.verbose", "print.timing", "print.info", "print.important", "print.warning", "print.error", "print.fatal", "print.notify"};
     public static final Level[] levelObjs = {Level.INFO, Level.DEBUG, Level.INFO, Level.INFO, Level.INFO, Level.WARN, Level.ERROR, Level.FATAL, NotifyLevel.NOTIFY};
 
+    private static final DateFormat dateFormat = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.MEDIUM);
+
     protected static Map<String, Integer> levelStringMap = new HashMap<String, Integer>();
 
     protected static PrintStream printStream = System.out;