Return-Path: X-Original-To: apmail-directory-commits-archive@www.apache.org Delivered-To: apmail-directory-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id C7FBA17709 for ; Sun, 31 May 2015 07:26:14 +0000 (UTC) Received: (qmail 92377 invoked by uid 500); 31 May 2015 07:26:05 -0000 Delivered-To: apmail-directory-commits-archive@directory.apache.org Received: (qmail 92329 invoked by uid 500); 31 May 2015 07:26:05 -0000 Mailing-List: contact commits-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@directory.apache.org Delivered-To: mailing list commits@directory.apache.org Received: (qmail 92318 invoked by uid 99); 31 May 2015 07:26:05 -0000 Received: from eris.apache.org (HELO hades.apache.org) (140.211.11.105) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 31 May 2015 07:26:05 +0000 Received: from hades.apache.org (localhost [127.0.0.1]) by hades.apache.org (ASF Mail Server at hades.apache.org) with ESMTP id 0E77FAC026E for ; Sun, 31 May 2015 07:26:05 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit 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 -0000 To: commits@directory.apache.org From: elecharny@apache.org X-Mailer: svnmailer-1.0.9 Message-Id: <20150531072605.0E77FAC026E@hades.apache.org> 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=" );