jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1413808 - /jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
Date Mon, 26 Nov 2012 20:00:20 GMT
Author: sebb
Date: Mon Nov 26 20:00:19 2012
New Revision: 1413808

URL: http://svn.apache.org/viewvc?rev=1413808&view=rev
Log:
Simplify now we are using Java 6

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

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java?rev=1413808&r1=1413807&r2=1413808&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java Mon Nov 26 20:00:19 2012
@@ -533,10 +533,8 @@ public class JMeterUtils implements Unit
     public static String getLocaleString(String locale){
         // All keys in messages.properties are lowercase (historical reasons?)
         String resKey = locale.toLowerCase(java.util.Locale.ENGLISH);
-        // TODO When migrating to JAVA 6, use resources#containsKey instead of try/catch
-        try {
+        if (resources.containsKey(resKey)) {
             return resources.getString(resKey);
-        } catch (MissingResourceException e) {
         }
         return locale;
     }



Mime
View raw message