jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1860519 - /jmeter/trunk/src/core/org/apache/jmeter/util/PropertiesBasedPrefixResolverForXpath2.java
Date Sun, 02 Jun 2019 12:36:37 GMT
Author: pmouawad
Date: Sun Jun  2 12:36:37 2019
New Revision: 1860519

URL: http://svn.apache.org/viewvc?rev=1860519&view=rev
Log:
Variables renaming for SONAR
Don't clean map as it's new one

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/PropertiesBasedPrefixResolverForXpath2.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/PropertiesBasedPrefixResolverForXpath2.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/PropertiesBasedPrefixResolverForXpath2.java?rev=1860519&r1=1860518&r2=1860519&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/PropertiesBasedPrefixResolverForXpath2.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/PropertiesBasedPrefixResolverForXpath2.java
Sun Jun  2 12:36:37 2019
@@ -29,19 +29,19 @@ import org.w3c.dom.Node;
  * jmeter property xpath.namespace.config
  */
 public class PropertiesBasedPrefixResolverForXpath2 extends PrefixResolverDefault {
-    private Map<String, String> namespace_map = new HashMap<>();
+    private Map<String, String> namespaceMap = new HashMap<>();
 
     /**
      * @param xpathExpressionContext Node
+     * @param ns Namespaces declaration
      */
-    public PropertiesBasedPrefixResolverForXpath2(Node xpathExpressionContext, String namespace)
{
+    public PropertiesBasedPrefixResolverForXpath2(Node xpathExpressionContext, String ns)
{
         super(xpathExpressionContext);
-        namespace_map.clear();
-        namespace = namespace.trim();
+        String namespace = ns.trim();
         if (!namespace.isEmpty()) {
-            for (String n : namespace.split("\\s+")) {
-                String[] keyandvalue = n.trim().split("=");
-                namespace_map.put(keyandvalue[0], keyandvalue[1]);
+            for (String prefixValue : namespace.split("\\s+")) {
+                String[] keyandvalue = prefixValue.trim().split("=");
+                namespaceMap.put(keyandvalue[0], keyandvalue[1]);
             }
         }
     }
@@ -55,7 +55,7 @@ public class PropertiesBasedPrefixResolv
      */
     @Override
     public String getNamespaceForPrefix(String prefix, Node namespaceContext) {
-        String namespace = namespace_map.get(prefix);
+        String namespace = namespaceMap.get(prefix);
         if (namespace == null) {
             return super.getNamespaceForPrefix(prefix, namespaceContext);
         } else {



Mime
View raw message