From 3a000519213f3fdc296662d699f5849a6481ee65 Mon Sep 17 00:00:00 2001
From: pgamba <pgamba@localhost>
Date: Tue, 13 Nov 2007 18:42:02 +0000
Subject: [PATCH] Fix 2588 - step 2 - NullPointer exception when enabling replication
---
opends/src/server/org/opends/server/replication/server/ReplicationBackend.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java b/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
index 6033b78..731fbb1 100644
--- a/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
+++ b/opends/src/server/org/opends/server/replication/server/ReplicationBackend.java
@@ -328,6 +328,22 @@
@Override()
public synchronized long getEntryCount()
{
+ if (server==null)
+ {
+ try
+ {
+ server = retrievesReplicationServer();
+ if (server == null)
+ {
+ return 0;
+ }
+ }
+ catch(Exception e)
+ {
+ return 0;
+ }
+ }
+
//This method only returns the number of actual change entries, the
//domain and any baseDN entries are not counted.
long retNum=0;
--
Gitblit v1.10.0