diff options
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/model')
-rw-r--r-- | src/main/java/pl/edu/mimuw/cloudatlas/model/ZMI.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/pl/edu/mimuw/cloudatlas/model/ZMI.java b/src/main/java/pl/edu/mimuw/cloudatlas/model/ZMI.java index 54fbf43..cda0296 100644 --- a/src/main/java/pl/edu/mimuw/cloudatlas/model/ZMI.java +++ b/src/main/java/pl/edu/mimuw/cloudatlas/model/ZMI.java @@ -219,8 +219,12 @@ public class ZMI implements Cloneable, Serializable { * @return a <code>PathName</code> object representing this zone */ public PathName getPathName() { - String name = ((ValueString)getAttributes().get("name")).getValue(); - return getFather() == null? PathName.ROOT : getFather().getPathName().levelDown(name); + if (getFather() == null) { + return PathName.ROOT; + } else { + String name = ((ValueString)getAttributes().get("name")).getValue(); + return getFather().getPathName().levelDown(name); + } } public static ZMI deserialize(InputStream in) { |