From 87b27a2668e2dbb9f58dc1ad3453b8dd47792e7f Mon Sep 17 00:00:00 2001
From: buczekp <buczekp>
Date: Fri, 3 Dec 2010 10:14:30 +0000
Subject: [PATCH] [LMS-1894] minor: extracted constant

SVN: 18989
---
 .../cisd/common/utilities/ReflectingStringEscaper.java      | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/common/source/java/ch/systemsx/cisd/common/utilities/ReflectingStringEscaper.java b/common/source/java/ch/systemsx/cisd/common/utilities/ReflectingStringEscaper.java
index 8020ded1812..6638e52f78b 100644
--- a/common/source/java/ch/systemsx/cisd/common/utilities/ReflectingStringEscaper.java
+++ b/common/source/java/ch/systemsx/cisd/common/utilities/ReflectingStringEscaper.java
@@ -39,6 +39,8 @@ public class ReflectingStringEscaper
     private static final Logger operationLog = LogFactory.getLogger(LogCategory.OPERATION,
             ReflectingStringEscaper.class);
 
+    private static int MIN_TIME_LOGGED_MS = 100;
+
     /**
      * Escape all the string fields on the bean.
      */
@@ -67,7 +69,7 @@ public class ReflectingStringEscaper
             T result = doEscapeDeep(beanClone);
             long escapeTime = System.currentTimeMillis();
             long timeSpent = escapeTime - startTime;
-            if (timeSpent > 100)
+            if (timeSpent >= MIN_TIME_LOGGED_MS)
             {
                 operationLog.info((timeSpent) + "ms for escaping (cloning: "
                         + (cloneTime - startTime) + "ms) "
@@ -93,7 +95,7 @@ public class ReflectingStringEscaper
             long time = System.currentTimeMillis();
             T result = doEscapeDeep(bean);
             long timeSpent = System.currentTimeMillis() - time;
-            if (timeSpent > 100)
+            if (timeSpent >= MIN_TIME_LOGGED_MS)
             {
                 operationLog.info((timeSpent) + "ms for escaping "
                         + (bean == null ? "" : bean.getClass().getSimpleName()));
-- 
GitLab