diff options
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 | 14 |
1 files changed, 8 insertions, 6 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 ab48c9b..1ec5b80 100644 --- a/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java +++ b/BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java @@ -11,12 +11,6 @@ public class ComponentDescription implements IDescribedComponent { String description, int version) { if (name == null) { throw new NullPointerException("Component name can't be null"); - } else if (author == null) { - throw new NullPointerException( - "Component author can't be null"); - } else if (description == null) { - throw new NullPointerException( - "Component description can't be null"); } else if (version <= 0) { throw new IllegalArgumentException( "Component version must be greater than 0"); @@ -67,11 +61,19 @@ public class ComponentDescription implements IDescribedComponent { @Override public String getAuthor() { + if(author == null) { + return IDescribedComponent.super.getAuthor(); + } + return author; } @Override public String getDescription() { + if(description == null) { + return IDescribedComponent.super.getDescription(); + } + return description; } |
