jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1413845 - /jmeter/trunk/src/core/org/apache/jmeter/util/JMeterUtils.java
Date Mon, 26 Nov 2012 21:11:10 GMT
Author: pmouawad
Date: Mon Nov 26 21:11:09 2012
New Revision: 1413845

URL: http://svn.apache.org/viewvc?rev=1413845&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=1413845&r1=1413844&r2=1413845&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 21:11:09 2012
@@ -496,7 +496,12 @@ public class JMeterUtils implements Unit
             if(forcedLocale != null) {
                 bundle = ResourceBundle.getBundle("org.apache.jmeter.resources.messages",
forcedLocale); // $NON-NLS-1$
             }
-            resString = bundle.getString(resKey);
+            if (bundle.containsKey(resKey)) {
+                resString = bundle.getString(resKey);
+            } else {
+                log.warn("ERROR! Resource string not found: [" + resKey + "]");
+                resString = defaultValue;                
+            }
             if (ignoreResorces ){ // Special mode for debugging resource handling
                 return "["+key+"]";
             }



Mime
View raw message