Github user neykov commented on a diff in the pull request:
https://github.com/apache/incubator-brooklyn/pull/131#discussion_r16894587
--- Diff:
utils/common/src/main/java/brooklyn/util/collections/MutableList.java ---
@@ -74,10 +80,25 @@ public MutableList(Iterable<? extends V> source) {
}
}
+ /** @deprecated since 0.7.0, use {@link #asImmutableCopy()}, or {@link
#asUnmodifiable()} / {@link #asUnmodifiableCopy()} */ @Deprecated
public ImmutableList<V> toImmutable() {
return ImmutableList.copyOf(this);
}
-
+ public List<V> asImmutableCopy() {
+ try {
+ return ImmutableList.copyOf(this);
+ } catch (Exception e) {
--- End diff --
Either catch NPE only or add Exceptions.propagateIfFatal.
---
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 [email protected] or file a JIRA ticket
with INFRA.
---