directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1690312 - in /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers: SizeLimitWrapper.java TimeLimitWrapper.java
Date Fri, 10 Jul 2015 22:09:47 GMT
Author: elecharny
Date: Fri Jul 10 22:09:47 2015
New Revision: 1690312

URL: http://svn.apache.org/r1690312
Log:
Fixed the tests

Modified:
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/SizeLimitWrapper.java
    directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/TimeLimitWrapper.java

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/SizeLimitWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/SizeLimitWrapper.java?rev=1690312&r1=1690311&r2=1690312&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/SizeLimitWrapper.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/SizeLimitWrapper.java
Fri Jul 10 22:09:47 2015
@@ -104,7 +104,7 @@ public class SizeLimitWrapper extends Ab
      */
     public SizeLimitWrapper( String sizeLimitStr )
     {
-        if ( sizeLimitStr != null )
+        if ( !Strings.isEmpty( sizeLimitStr ) )
         {
             // use a lowercase version of the string
             String lowerCaseSizeLimitStr = sizeLimitStr.toLowerCase();
@@ -200,6 +200,14 @@ public class SizeLimitWrapper extends Ab
                     }
                 }
             }
+            else
+            {
+                isValid = true;
+            }
+        }
+        else
+        {
+            isValid = true;
         }
     }
     

Modified: directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/TimeLimitWrapper.java
URL: http://svn.apache.org/viewvc/directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/TimeLimitWrapper.java?rev=1690312&r1=1690311&r2=1690312&view=diff
==============================================================================
--- directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/TimeLimitWrapper.java
(original)
+++ directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/TimeLimitWrapper.java
Fri Jul 10 22:09:47 2015
@@ -19,6 +19,8 @@
  */
 package org.apache.directory.studio.openldap.config.editor.wrappers;
 
+import org.apache.directory.api.util.Strings;
+
 /**
  * This class wraps the TimeLimit parameter :
  * <pre>
@@ -69,7 +71,7 @@ public class TimeLimitWrapper extends Ab
      */
     public TimeLimitWrapper( String timeLimitStr )
     {
-        if ( timeLimitStr != null )
+        if ( !Strings.isEmpty( timeLimitStr ) )
         {
             // use a lowercase version of the string
             String lowerCaseTimeLimitStr = timeLimitStr.toLowerCase();



Mime
View raw message