diff options
author | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
---|---|---|
committer | Ade Lee <alee@redhat.com> | 2011-12-07 16:58:12 -0500 |
commit | 32150d3ee32f8ac27118af7c792794b538c78a2f (patch) | |
tree | 52dd96f664a6fa51be25b28b6f10adc5f2c9f660 /pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java | |
parent | f05d58a46795553beb8881039cc922974b40db34 (diff) | |
download | pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.gz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.tar.xz pki-32150d3ee32f8ac27118af7c792794b538c78a2f.zip |
Formatting
Formatted project according to eclipse project settings
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java')
-rw-r--r-- | pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java b/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java index 61beb4236..72cef8991 100644 --- a/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java +++ b/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java @@ -17,7 +17,6 @@ // --- END COPYRIGHT BLOCK --- package com.netscape.cmscore.dbs; - import java.math.BigInteger; import com.netscape.certsrv.apps.CMS; @@ -27,15 +26,15 @@ import com.netscape.certsrv.dbs.IDBSubsystem; import com.netscape.certsrv.dbs.replicadb.IReplicaIDRepository; /** - * A class represents a replica repository. It - * creates unique managed replica IDs. + * A class represents a replica repository. It creates unique managed replica + * IDs. * <P> - * + * * @author alee * @version $Revision$, $Date$ */ -public class ReplicaIDRepository extends Repository - implements IReplicaIDRepository { +public class ReplicaIDRepository extends Repository implements + IReplicaIDRepository { private IDBSubsystem mDBService; private String mBaseDN; @@ -43,25 +42,27 @@ public class ReplicaIDRepository extends Repository /** * Constructs a certificate repository. */ - public ReplicaIDRepository(IDBSubsystem dbService, int increment, String baseDN) - throws EDBException { + public ReplicaIDRepository(IDBSubsystem dbService, int increment, + String baseDN) throws EDBException { super(dbService, increment, baseDN); mBaseDN = baseDN; mDBService = dbService; } - - + /** * Returns last serial number in given range */ - public BigInteger getLastSerialNumberInRange(BigInteger serial_low_bound, BigInteger serial_upper_bound) - throws EBaseException { - CMS.debug("ReplicaIDReposoitory: in getLastSerialNumberInRange: low " + serial_low_bound + " high " + serial_upper_bound); - if(serial_low_bound == null || serial_upper_bound == null || serial_low_bound.compareTo(serial_upper_bound) >= 0 ) { + public BigInteger getLastSerialNumberInRange(BigInteger serial_low_bound, + BigInteger serial_upper_bound) throws EBaseException { + CMS.debug("ReplicaIDReposoitory: in getLastSerialNumberInRange: low " + + serial_low_bound + " high " + serial_upper_bound); + if (serial_low_bound == null || serial_upper_bound == null + || serial_low_bound.compareTo(serial_upper_bound) >= 0) { return null; } BigInteger ret = new BigInteger(getMinSerial()); - if ((ret==null) || (ret.compareTo(serial_upper_bound) >0) || (ret.compareTo(serial_low_bound) <0)) { + if ((ret == null) || (ret.compareTo(serial_upper_bound) > 0) + || (ret.compareTo(serial_low_bound) < 0)) { return null; } return ret; |