List<String> (@NotNull String parentTextOrig) { if (parentTextOrig.contains("!")) { int index = parentTextOrig.indexOf('!'); String zip = parentTextOrig.substring(1, index + 1); String rest = parentTextOrig.substring(index + 1); List<String> subPaths = new ArrayList<>(); subPaths.add(zip); subPaths.addAll(ContainerUtil.filter(rest.split("/"), s -> !s.isEmpty())); return subPaths; } return ContainerUtil.filter(parentTextOrig.split("/"), s -> !s.isEmpty()); }