brooklyn-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikezaccardo <...@git.apache.org>
Subject [GitHub] incubator-brooklyn pull request: Updates to Test framework asserti...
Date Tue, 24 Nov 2015 21:02:10 GMT
Github user mikezaccardo commented on a diff in the pull request:

    https://github.com/apache/incubator-brooklyn/pull/1066#discussion_r45794188
  
    --- Diff: usage/test-framework/src/main/java/org/apache/brooklyn/test/framework/SimpleShellCommandTest.java
---
    @@ -87,21 +90,24 @@
          * If not explicitly configured, the default assertion is a non-zero exit code.
          */
         @SetFromFlag("assertStatus")
    -    ConfigKey<Map> ASSERT_STATUS = ConfigKeys.newConfigKey(Map.class, "assert.status",
    -            "Assertions on command exit code", Maps.newLinkedHashMap());
    +    ConfigKey<List<Map<String, Object>>> ASSERT_STATUS = ConfigKeys.newConfigKey(
    +        new TypeToken<List<Map<String, Object>>>() {},
    +        "assert.status", "Assertions on command exit code", new ArrayList<Map<String,
Object>>());
    --- End diff --
    
    Perhaps use `Collections.emptyList()` for an immutable empty list as the default value
here and below.
    
    It looks the list is replaced and never added to directly so this should be fine.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message