From 2d3365bf7f27490183033cd56542a0b42ad26574 Mon Sep 17 00:00:00 2001
From: coulbeck <coulbeck@localhost>
Date: Thu, 14 Sep 2006 19:32:45 +0000
Subject: [PATCH] Fix for issue 646: Cannot specify all backends in task backup.

---
 opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java b/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java
index 2b18e83..8eadb57 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/tasks/BackupTask.java
@@ -181,7 +181,7 @@
     // backend ID was given.  They are mutually exclusive.
     if (backUpAll)
     {
-      if (backendIDList != null)
+      if (!backendIDList.isEmpty())
       {
         int    msgID   = MSGID_BACKUPDB_CANNOT_MIX_BACKUP_ALL_AND_BACKEND_ID;
         String message = getMessage(msgID, ATTR_TASK_BACKUP_ALL,
@@ -191,7 +191,7 @@
         return TaskState.STOPPED_BY_ERROR;
       }
     }
-    else if (backendIDList == null)
+    else if (backendIDList.isEmpty())
     {
       int    msgID   = MSGID_BACKUPDB_NEED_BACKUP_ALL_OR_BACKEND_ID;
       String message = getMessage(msgID, ATTR_TASK_BACKUP_ALL,
@@ -392,7 +392,7 @@
 
       // If the directory doesn't exist, then create it.  If it does exist, then
       // see if it has a backup descriptor file.
-      BackupDirectory backupDir = null;
+      BackupDirectory backupDir;
       backupDirFile = new File(backupDirPath);
       if (backupDirFile.exists())
       {

--
Gitblit v1.10.0