[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GitHub] brooklyn-server pull request #982: Improve coercions esp with generics


Github user ahgittin commented on a diff in the pull request:

    https://github.com/apache/brooklyn-server/pull/982#discussion_r214705115
  
    --- 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 --
    
    fixed, in light of comment below


---