jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From fschumac...@apache.org
Subject svn commit: r1853275 - /jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java
Date Sat, 09 Feb 2019 13:24:35 GMT
Author: fschumacher
Date: Sat Feb  9 13:24:35 2019
New Revision: 1853275

URL: http://svn.apache.org/viewvc?rev=1853275&view=rev
Log:
Use log string formatting and Javadoc markup.

Modified:
    jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java

Modified: jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java?rev=1853275&r1=1853274&r2=1853275&view=diff
==============================================================================
--- jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java (original)
+++ jmeter/trunk/src/functions/org/apache/jmeter/functions/XPathWrapper.java Sat Feb  9 13:24:35
2019
@@ -30,8 +30,8 @@ import org.slf4j.LoggerFactory;
 import org.xml.sax.SAXException;
 
 /**
- * This class wraps the XPathFileContainer for use across multiple threads.
- *
+ * This class wraps the {@link XPathFileContainer} for use across multiple threads.
+ * <p>
  * It maintains a list of nodelist containers, one for each file/xpath combination
  *
  */
@@ -39,7 +39,7 @@ final class XPathWrapper {
 
     private static final Logger log = LoggerFactory.getLogger(XPathWrapper.class);
 
-    /*
+    /**
      * This Map serves two purposes:
      * <ul>
      *   <li>maps names to  containers</li>
@@ -64,8 +64,9 @@ final class XPathWrapper {
     }
 
     private static XPathFileContainer open(String file, String xpathString) {
-        String tname = Thread.currentThread().getName();
-        log.info(tname+": Opening " + file);
+        if (log.isInfoEnabled()) {
+            log.info("{}: Opening {}", Thread.currentThread().getName(), file);
+        }
         XPathFileContainer frcc=null;
         try {
             frcc = new XPathFileContainer(file, xpathString);
@@ -106,19 +107,22 @@ final class XPathWrapper {
             my.put(key,xpfc); // save our local copy
         }
         if (xpfc.size()==0){
-            log.warn("XPathFileContainer has no nodes: "+file+" "+xpathString);
+            log.warn("XPathFileContainer has no nodes: {} {}", file, xpathString);
             return ""; //$NON-NLS-1$
         }
         int currentRow = xpfc.nextRow();
-        log.debug("getting match number " + currentRow);
+        if (log.isDebugEnabled()) {
+            log.debug("getting match number {}", Integer.toString(currentRow));
+        }
         return xpfc.getXPathString(currentRow);
     }
 
     public static void clearAll() {
         log.debug("clearAll()");
         filePacks.get().clear();
-        String tname = Thread.currentThread().getName();
-        log.info(tname+": clearing container");
+        if (log.isInfoEnabled()) {
+            log.info("{}: clearing container", Thread.currentThread().getName());
+        }
         synchronized (fileContainers) {
             fileContainers.clear();
         }



Mime
View raw message