summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
committerAde Lee <alee@redhat.com>2011-12-08 21:15:59 -0500
commit171aaece4f23709d33d180cf36eb3af5e454b0c9 (patch)
tree1485f9f0a7bd10de4ff25030db575dbb8dafae74 /pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java
parentadad2fcee8a29fdb82376fbce07dedb11fccc182 (diff)
downloadpki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.gz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.tar.xz
pki-171aaece4f23709d33d180cf36eb3af5e454b0c9.zip
Revert "Formatting"
This reverts commit 32150d3ee32f8ac27118af7c792794b538c78a2f.
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.java31
1 files changed, 15 insertions, 16 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 72cef8991..61beb4236 100644
--- a/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java
+++ b/pki/base/common/src/com/netscape/cmscore/dbs/ReplicaIDRepository.java
@@ -17,6 +17,7 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.dbs;
+
import java.math.BigInteger;
import com.netscape.certsrv.apps.CMS;
@@ -26,15 +27,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;
@@ -42,27 +43,25 @@ public class ReplicaIDRepository extends Repository implements
/**
* 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;