jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From milam...@apache.org
Subject svn commit: r1513743 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Date Wed, 14 Aug 2013 07:06:29 GMT
Author: milamber
Date: Wed Aug 14 07:06:29 2013
New Revision: 1513743

URL: http://svn.apache.org/r1513743
Log:
Fix an issue with localization in Source Address Type list
Bugzilla Id: 54874

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java?rev=1513743&r1=1513742&r2=1513743&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java
Wed Aug 14 07:06:29 2013
@@ -31,6 +31,7 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
+import java.util.LinkedHashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -197,10 +198,11 @@ public abstract class HTTPSamplerBase ex
 
     public static final int SOURCE_TYPE_DEVICE_IPV6 = 3;
 
-    public static final Map<String, Integer> getSourceTypeMap() {
-        Map<String, Integer> sourceTypeMap = new HashMap<String, Integer>(4);
-        sourceTypeMap.put(JMeterUtils.getResString("web_testing_source_ip_device"), SOURCE_TYPE_DEVICE);
//$NON-NLS-1$
+    // Use for ComboBox Source Address Type. LinkedHashMap to preserve order (specially with
localization)
+    public static final LinkedHashMap<String, Integer> getSourceTypeMap() {
+        LinkedHashMap<String, Integer> sourceTypeMap = new LinkedHashMap<String,
Integer>(4);
         sourceTypeMap.put(JMeterUtils.getResString("web_testing_source_ip_hostname"), SOURCE_TYPE_IP_HOSTNAME);
//$NON-NLS-1$
+        sourceTypeMap.put(JMeterUtils.getResString("web_testing_source_ip_device"), SOURCE_TYPE_DEVICE);
//$NON-NLS-1$
         sourceTypeMap.put(JMeterUtils.getResString("web_testing_source_ip_device_ipv4"),
SOURCE_TYPE_DEVICE_IPV4); //$NON-NLS-1$
         sourceTypeMap.put(JMeterUtils.getResString("web_testing_source_ip_device_ipv6"),
SOURCE_TYPE_DEVICE_IPV6); //$NON-NLS-1$
         return sourceTypeMap;



Mime
View raw message