|
In our naming validation for the catalog, we parse on the "/" character.
From Paths.java line 201: ``` public static List<String> names(String path) { if (path == null || path.length() == 0) { return Collections.emptyList(); }
int index = 0; int split = path.indexOf('/'); if (split == -1) { return Collections.singletonList(path); }
ArrayList<String> names = new ArrayList<String>(3); String item; do { item = path.substring(index, split); if (item != "/") { names.add(item); }
index = split + 1; split = path.indexOf('/', index); } while (split != -1); item = path.substring(index); if (item != null && item.length() != 0 && item != "/") { names.add(item); }
return names; } ```
However, there might exist a style name with a forward slash in the string of the name. Example: "foo/bar". When passed through our validator, this will be unexpectedly translated into {"foo", "bar"}
.
|