Github user ahgittin commented on a diff in the pull request:
https://github.com/apache/brooklyn-server/pull/982#discussion_r214702501
--- Diff:
utils/common/src/main/java/org/apache/brooklyn/util/guava/Maybe.java ---
@@ -501,6 +501,6 @@ public boolean equals(Object obj) {
/** Finds the {@link Absent#getException()} if {@link #isAbsent()}, or
null */
public static RuntimeException getException(Maybe<?> t) {
- return ((Maybe.Absent<?>)t).getException();
+ return t instanceof Maybe.Absent ?
((Maybe.Absent<?>)t).getException() : null;
--- End diff --
(note the javadoc here, which is now accurate)
---