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/JavaPropertiesPanel.java | 14 ++++++--------
1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/JavaPropertiesPanel.java b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/JavaPropertiesPanel.java
index a1a31fc..5841fab 100644
--- a/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/JavaPropertiesPanel.java
+++ b/opendj-server-legacy/src/main/java/org/opends/guitools/controlpanel/ui/JavaPropertiesPanel.java
@@ -761,7 +761,7 @@
}
}
}
- if (javaHomeErrors.size() == 0)
+ if (javaHomeErrors.isEmpty())
{
final Set<String> providedArguments = new HashSet<String>();
for (JavaArgumentsDescriptor cmd : getCurrentJavaArguments())
@@ -833,7 +833,7 @@
}
}
}
- if (notWorkingArgs.size() > 0)
+ if (!notWorkingArgs.isEmpty())
{
File javaFile = getJavaFile(new File(jvm));
LocalizableMessage confirmationMessage;
@@ -974,7 +974,7 @@
{
task.canLaunch(newTask, errors);
}
- if (errors.size() == 0)
+ if (errors.isEmpty())
{
launchOperation(newTask,
INFO_CTRL_PANEL_UPDATING_JAVA_SETTINGS_SUMMARY.get(),
@@ -1392,13 +1392,11 @@
// All the operations are incompatible if they apply to this
// backend for safety. This is a short operation so the limitation
// has not a lot of impact.
- Set<String> backends =
- new TreeSet<String>(taskToBeLaunched.getBackends());
+ 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));
return false;
}
}
--
Gitblit v1.10.0