summaryrefslogtreecommitdiff
path: root/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java
diff options
context:
space:
mode:
Diffstat (limited to 'BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java')
-rw-r--r--BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java13
1 files changed, 6 insertions, 7 deletions
diff --git a/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java
index 9429dde..ab48c9b 100644
--- a/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java
+++ b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java
@@ -10,19 +10,19 @@ public class ComponentDescription implements IDescribedComponent {
private static void sanityCheckArgs(String name, String author,
String description, int version) {
if (name == null) {
- throw new IllegalArgumentException(
- "Component name can't be null");
+ throw new NullPointerException("Component name can't be null");
} else if (author == null) {
- throw new IllegalArgumentException(
+ throw new NullPointerException(
"Component author can't be null");
} else if (description == null) {
- throw new IllegalArgumentException(
+ throw new NullPointerException(
"Component description can't be null");
- } else if (version < 0) {
+ } else if (version <= 0) {
throw new IllegalArgumentException(
"Component version must be greater than 0");
}
}
+
/**
* The author of the component
*/
@@ -53,8 +53,7 @@ public class ComponentDescription implements IDescribedComponent {
* @param version
* The version of the component
* @throws IllegalArgumentException
- * thrown if name, author or description is null, or if
- * version is less than 1
+ * thrown if version is less than 1
*/
public ComponentDescription(String name, String author,
String description, int version) {