Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/982#discussion_r214703069
--- Diff:
utils/common/src/test/java/org/apache/brooklyn/util/text/StringEscapesTest.java
---
@@ -115,4 +117,80 @@ public void testJavaLists() {
JavaStringEscapes.unwrapJsonishListIfPossible("\"\",,x,\"\""));
}
+ @Test
+ public void testJavaListString() {
+ Assert.assertEquals(MutableList.of("hello", "world"),
+ JavaStringEscapes.unwrapQuotedJavaStringList("\"hello\",
\"world\"", ","));
+ try {
+ JavaStringEscapes.unwrapQuotedJavaStringList("\"hello\",
world", ",");
+ Assert.fail("Should have thrown");
+ } catch (Exception e) { /* expected */ }
+
+ Assert.assertEquals(MutableList.of("hello", "world"),
--- End diff --
yeah ... i just copy-pasted other examples; sometimes when i encounter this
i change it if it's irritating, but in this case i didn't (yet).
---