[Fix] Fixed NPE in toString()
This commit is contained in:
parent
69d1f77364
commit
c66446391a
|
@ -330,6 +330,8 @@ public class Order extends AbstractStrolchRootElement implements StrolchRootElem
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.version == null)
|
||||
return getLocator().toString();
|
||||
return getLocator() + ", Version: " + this.version.getVersion();
|
||||
}
|
||||
|
||||
|
|
|
@ -401,6 +401,8 @@ public class Resource extends AbstractStrolchRootElement implements StrolchRootE
|
|||
|
||||
@Override
|
||||
public String toString() {
|
||||
if (this.version == null)
|
||||
return getLocator().toString();
|
||||
return getLocator() + ", Version: " + this.version.getVersion();
|
||||
}
|
||||
|
||||
|
|
|
@ -786,7 +786,7 @@ public class Activity extends AbstractStrolchRootElement
|
|||
builder.append(getStart());
|
||||
builder.append(", end=");
|
||||
builder.append(getEnd());
|
||||
if (isRootElement()) {
|
||||
if (isRootElement() && this.version != null) {
|
||||
builder.append(", version=");
|
||||
builder.append(this.version.getVersion());
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue