geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject svn commit: r1800734 - /geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
Date Tue, 04 Jul 2017 07:19:46 GMT
Author: rmannibucau
Date: Tue Jul  4 07:19:46 2017
New Revision: 1800734

URL: http://svn.apache.org/viewvc?rev=1800734&view=rev
Log:
using isEmpty instead of length check

Modified:
    geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java

Modified: geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
URL: http://svn.apache.org/viewvc/geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java?rev=1800734&r1=1800733&r2=1800734&view=diff
==============================================================================
--- geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
(original)
+++ geronimo/components/config/trunk/impl/src/main/java/org/apache/geronimo/config/ConfigImpl.java
Tue Jul  4 07:19:46 2017
@@ -97,7 +97,7 @@ public class ConfigImpl implements Confi
     @Override
     public <T> T getValue(String propertyName, Class<T> propertyType) {
         String value = getValue(propertyName);
-        if (value == null || value.length() == 0) {
+        if (value == null || value.isEmpty()) {
             throw new NoSuchElementException("No configured value found for config key "
+ propertyName);
         }
 



Mime
View raw message