Skip to content

Commit

Permalink
ElementTag internal: handle null properly
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 22, 2022
1 parent 2e8bffc commit 0972545
Showing 1 changed file with 3 additions and 12 deletions.
Expand Up @@ -155,13 +155,7 @@ public ElementTag(String string) {
this.prefix = "element";
if (string == null) {
if (CoreConfiguration.debugVerbose) {
try {
throw new RuntimeException("Trace");
}
catch (Exception ex) {
Debug.echoError(ex);
}
Debug.log("Element - Null construction!");
Debug.echoError("Element - Null construction!");
}
this.element = "null";
}
Expand Down Expand Up @@ -219,13 +213,10 @@ public ElementTag(float flt) {
}

public ElementTag(String prefix, String string) {
if (prefix == null) {
this.prefix = "element";
}
else {
this(string);
if (prefix != null) {
this.prefix = prefix;
}
this.element = string;
}

static final BigDecimal max = new BigDecimal("10E1000");
Expand Down

0 comments on commit 0972545

Please sign in to comment.