diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-05-10 16:02:45 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-05-10 16:02:45 -0400 |
| commit | 61fd71f69e080790da722e0e03b71ecd7c2538a2 (patch) | |
| tree | e5c1150b27b84d550f807e44ac82688216451f00 /BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java | |
| parent | 87ae1dfc8d8cb7b51d7bda4750ce841bbe691cfc (diff) | |
General update
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.java | 13 |
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) { |
