From b8f523c95f4fd5fc705f2c6c2a2d98217b9da450 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Tue, 21 Apr 2015 20:10:37 +0000
Subject: [PATCH] Converted use of Collection.size() to Collection.isEmpty().

---
 opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BackupPanel.java |   13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BackupPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BackupPanel.java
index b6dce95..d004801 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BackupPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/BackupPanel.java
@@ -556,7 +556,7 @@
             Utilities.getParentDialog(BackupPanel.this).setVisible(false);
           }
         }
-        if (errors.size() > 0)
+        if (!errors.isEmpty())
         {
           displayErrorDialog(errors);
         }
@@ -684,15 +684,12 @@
       boolean canLaunch = true;
       if (state == State.RUNNING && runningOnSameServer(taskToBeLaunched))
       {
-        // All the operations are incompatible if they apply to this
-        // backend.
-        Set<String> backends =
-          new TreeSet<String>(taskToBeLaunched.getBackends());
+        // All the operations are incompatible if they apply to this backend.
+        Set<String> backends = new TreeSet<>(taskToBeLaunched.getBackends());
         backends.retainAll(getBackends());
-        if (backends.size() > 0)
+        if (!backends.isEmpty())
         {
-          incompatibilityReasons.add(getIncompatibilityMessage(this,
-              taskToBeLaunched));
+          incompatibilityReasons.add(getIncompatibilityMessage(this, taskToBeLaunched));
           canLaunch = false;
         }
       }

--
Gitblit v1.10.0