diff options
| author | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-10-21 14:14:48 -0400 |
|---|---|---|
| committer | bculkin2442 <bjculkin@mix.wvu.edu> | 2016-10-21 14:14:48 -0400 |
| commit | 5cf7bcf156970fe72f79e40b8a6e320ea160ac83 (patch) | |
| tree | 52bba3b684c493c726538194b5965150abb4a786 /BJC-Utils2/src/main/java/bjc/utils/components/ComponentDescription.java | |
| parent | b0516949d7577b809c75d7267df77bff2cdb078b (diff) | |
Documentation
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; } |
