diff --git a/model/src/main/java/one/nem/lacerta/model/PublicPath.java b/model/src/main/java/one/nem/lacerta/model/PublicPath.java index 3181d00e..0da4ce3f 100644 --- a/model/src/main/java/one/nem/lacerta/model/PublicPath.java +++ b/model/src/main/java/one/nem/lacerta/model/PublicPath.java @@ -21,18 +21,22 @@ public class PublicPath { this.path.add(path); } - public PublicPath resolve(String path) { + private void resolveInternal(String path) { if (path.equals("..")) { this.path.remove(this.path.size() - 1); } else { add(path); } + } + + public PublicPath resolve(String path) { + resolveInternal(path); return this; } public PublicPath resolve(List path) { for (String p : path) { - resolve(p); + resolveInternal(p); } return this; }