Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoberto E. Escobar2012-07-31 22:24:41 +0000
committerRoberto E. Escobar2012-07-31 22:24:41 +0000
commit8feffbae1a06fa2643470eecfd485617e1b94b53 (patch)
tree676a780448850d81f58d8e09dbb55afdee20b6a1
parentbdb60495310dee9094696c3953b6334b7867c85d (diff)
downloadorg.eclipse.osee-8feffbae1a06fa2643470eecfd485617e1b94b53.tar.gz
org.eclipse.osee-8feffbae1a06fa2643470eecfd485617e1b94b53.tar.xz
org.eclipse.osee-8feffbae1a06fa2643470eecfd485617e1b94b53.zip
refinement: Add array condition check0.10.1.v201207312314_RC
-rw-r--r--plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/Conditions.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/Conditions.java b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/Conditions.java
index 9a2daf6b35b..a307c4c9409 100644
--- a/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/Conditions.java
+++ b/plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/Conditions.java
@@ -94,6 +94,13 @@ public final class Conditions {
}
}
+ public static void checkNotNullOrEmpty(Object[] array, String objectName) throws OseeCoreException {
+ checkNotNull(array, objectName);
+ if (array.length <= 0) {
+ throw new OseeArgumentException("%s cannot be empty", objectName);
+ }
+ }
+
public static void checkNotNullOrEmpty(Collection<? extends Object> collection, String objectName) throws OseeCoreException {
checkNotNull(collection, objectName);
if (collection.isEmpty()) {

Back to the top