Author: fschumacher
Date: Sun Dec 13 10:56:53 2015
New Revision: 1719789
URL: http://svn.apache.org/viewvc?rev=1719789&view=rev
Log:
Simplify getProperty. Log default value, even if it is null, since it would have been
used in the old logic anyway.
Modified:
jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
Modified: jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java?rev=1719789&r1=1719788&r2=1719789&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
(original)
+++ jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java
Sun Dec 13 10:56:53 2015
@@ -346,18 +346,13 @@ public class ReportGeneratorConfiguratio
private static <TProperty> TProperty getProperty(Props props, String key,
TProperty defaultValue, Class<TProperty> clazz)
throws ConfigurationException {
- TProperty property = null;
String value = props.getValue(key);
if (value == null) {
- if (defaultValue != null) {
- property = defaultValue;
- log.info(String.format(NOT_FOUND_PROPERTY_FMT, key,
- defaultValue));
- }
- } else {
- property = ConfigurationUtils.convert(value, clazz);
+ log.info(String.format(NOT_FOUND_PROPERTY_FMT, key,
+ defaultValue));
+ return defaultValue;
}
- return property;
+ return ConfigurationUtils.convert(value, clazz);
}
private static <TProperty> TProperty getOptionalProperty(Props props,
|