m-chrzan.xyz
aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/pl/edu/mimuw/cloudatlas/model
diff options
context:
space:
mode:
authorMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-12-30 22:16:46 +0100
committerMarcin Chrzanowski <marcin.j.chrzanowski@gmail.com>2019-12-30 22:16:46 +0100
commitca2f1ab4a37f0d590d5c116cd1fa7c341c77fad3 (patch)
treefb3b8ff1629e5480086f43065156625985a2e034 /src/main/java/pl/edu/mimuw/cloudatlas/model
parentfda20e7aa496926d4f4d78921925025040414d9b (diff)
Implement modular getZoneSet
Diffstat (limited to 'src/main/java/pl/edu/mimuw/cloudatlas/model')
-rw-r--r--src/main/java/pl/edu/mimuw/cloudatlas/model/ZMI.java8
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) {