You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2015/05/31 09:26:04 UTC

svn commit: r1682684 - /directory/studio/trunk/plugins/openldap.config.editor/src/main/java/org/apache/directory/studio/openldap/config/editor/wrappers/TimeLimitWrapper.java

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=" );