[ofbiz-framework] branch trunk updated: Fixed: with "replaces module by MODULE everywhere" I put in a JavaDoc bug.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[ofbiz-framework] branch trunk updated: Fixed: with "replaces module by MODULE everywhere" I put in a JavaDoc bug.

jleroux@apache.org
This is an automated email from the ASF dual-hosted git repository.

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 9cbcef3  Fixed: with "replaces module by MODULE everywhere" I put in a JavaDoc bug.
9cbcef3 is described below

commit 9cbcef3209e6f2a5fa9197a8077e42d7a8003641
Author: Jacques Le Roux <[hidden email]>
AuthorDate: Sun Jul 26 10:30:45 2020 +0200

    Fixed: with "replaces module by MODULE everywhere" I put in a JavaDoc bug.
   
    This fixes it and clarifies things by using className instead of module in code
    when used as a var not as the MODULE const.
---
 .../java/org/apache/ofbiz/base/util/UtilTimer.java | 27 +++++++++++++---------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilTimer.java b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilTimer.java
index 58a13df..17502a6 100644
--- a/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilTimer.java
+++ b/framework/base/src/main/java/org/apache/ofbiz/base/util/UtilTimer.java
@@ -84,12 +84,17 @@ public class UtilTimer {
         return timerString(message, this.getClass().getName());
     }
 
-    /** Creates a string with information including the passed message, the last passed message and the time since the last call, and the time since the beginning
-     * @param message A message to put into the timer String
-     * @param MODULE The debug/log MODULE/thread to use, can be null for root MODULE
+    /**
+     * Creates a string with information including the passed message, the last passed message and the time since the last call, and the time since
+     * the beginning
+     *
+     * @param message
+     *            A message to put into the timer String
+     * @param className
+     *            The debug/log className/thread to use, can be null for root className
      * @return A String with the timing information, the timer String
      */
-    public String timerString(String message, String module) {
+    public String timerString(String message, String className) {
         // time this call to avoid it interfering with the main timer
         long tsStart = System.currentTimeMillis();
 
@@ -108,7 +113,7 @@ public class UtilTimer {
         lastMessage = message;
         String retString = retBuf.toString();
         if (log) {
-            Debug.log(Debug.TIMING, null, retString, module, "org.apache.ofbiz.base.util.UtilTimer");
+            Debug.log(Debug.TIMING, null, retString, className, MODULE);
         }
 
         // have lastMessageTime come as late as possible to just time what happens between calls
@@ -222,17 +227,17 @@ public class UtilTimer {
         return timer;
     }
 
-    public static void timerLog(String timerName, String message, String module) {
+    public static void timerLog(String timerName, String message, String className) {
         UtilTimer timer = UtilTimer.getTimer(timerName);
         if (!timer.isRunning()) {
             timer.startTimer();
         }
 
         if (timer.getLog()) {
-            if (module == null) {
-                module = timer.getClass().getName();
+            if (className == null) {
+                className = timer.getClass().getName();
             }
-            timer.timerString(message, module);
+            timer.timerString(message, className);
         }
     }
 
@@ -244,9 +249,9 @@ public class UtilTimer {
         UtilTimer.closeTimer(timerName, message, null);
     }
 
-    public static void closeTimer(String timerName, String message, String module) {
+    public static void closeTimer(String timerName, String message, String className) {
         if (message != null) {
-            UtilTimer.timerLog(timerName, message, module);
+            UtilTimer.timerLog(timerName, message, className);
         }
         staticTimers.remove(timerName);
     }