From commits-return-4460-apmail-jmeter-commits-archive=jmeter.apache.org@jmeter.apache.org Sun Dec 13 10:56:56 2015 Return-Path: X-Original-To: apmail-jmeter-commits-archive@minotaur.apache.org Delivered-To: apmail-jmeter-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 41446186A8 for ; Sun, 13 Dec 2015 10:56:56 +0000 (UTC) Received: (qmail 46885 invoked by uid 500); 13 Dec 2015 10:56:56 -0000 Delivered-To: apmail-jmeter-commits-archive@jmeter.apache.org Received: (qmail 46856 invoked by uid 500); 13 Dec 2015 10:56:56 -0000 Mailing-List: contact commits-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@jmeter.apache.org Delivered-To: mailing list commits@jmeter.apache.org Received: (qmail 46847 invoked by uid 99); 13 Dec 2015 10:56:56 -0000 Received: from Unknown (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Dec 2015 10:56:56 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id C28E4C0535 for ; Sun, 13 Dec 2015 10:56:55 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.99 X-Spam-Level: X-Spam-Status: No, score=0.99 tagged_above=-999 required=6.31 tests=[KAM_LAZY_DOMAIN_SECURITY=1, T_RP_MATCHES_RCVD=-0.01] autolearn=disabled Received: from mx1-eu-west.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id fWZ3wibcgZtF for ; Sun, 13 Dec 2015 10:56:55 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-eu-west.apache.org (ASF Mail Server at mx1-eu-west.apache.org) with ESMTP id 6731D20C61 for ; Sun, 13 Dec 2015 10:56:54 +0000 (UTC) Received: from svn01-us-west.apache.org (svn.apache.org [10.41.0.6]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 7D80DE043F for ; Sun, 13 Dec 2015 10:56:53 +0000 (UTC) Received: from svn01-us-west.apache.org (localhost [127.0.0.1]) by svn01-us-west.apache.org (ASF Mail Server at svn01-us-west.apache.org) with ESMTP id 59D7F3A0051 for ; Sun, 13 Dec 2015 10:56:53 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1719789 - /jmeter/trunk/src/core/org/apache/jmeter/report/config/ReportGeneratorConfiguration.java Date: Sun, 13 Dec 2015 10:56:53 -0000 To: commits@jmeter.apache.org From: fschumacher@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20151213105653.59D7F3A0051@svn01-us-west.apache.org> 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 getProperty(Props props, String key, TProperty defaultValue, Class 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 getOptionalProperty(Props props,