directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1682684 - /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/TimeLimitWrapper.java
Date Sun, 31 May 2015 07:26:04 GMT
Author: elecharny
Date: Sun May 31 07:26:04 2015
New Revision: 1682684

URL: http://svn.apache.org/r1682684
Log:
Another fix : when hard < soft, use hard

Modified:
    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/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=1682684&r1=1682683&r2=1682684&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
Sun May 31 07:26:04 2015
@@ -500,12 +500,16 @@ public class TimeLimitWrapper
                         {
                             sb.append( "time.hard=unlimited" );
                         }
-                        else if ( ( hardLimit.intValue() == 0 ) || ( hardLimit.intValue()
< softLimit.intValue() ) )
+                        else if ( hardLimit.intValue() == 0 )
                         {
                             // Special cases : hard = soft
-                            // or hard limit should be higher than soft limit : use the short
limit
                             sb.append( "time=" ).append( softLimit );
                         }
+                        else if ( hardLimit.intValue() < softLimit.intValue() )
+                        {
+                            // when the hard limit is lower than the soft limit : use the
hard limit
+                            sb.append( "time=" ).append( hardLimit );
+                        }
                         else 
                         {
                             sb.append( "time.hard=" );



Mime
View raw message