diff options
Diffstat (limited to 'plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/Conditions.java')
-rw-r--r-- | plugins/org.eclipse.osee.framework.core/src/org/eclipse/osee/framework/core/util/Conditions.java | 7 |
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()) { |