summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--v3po/translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/util/write/ReflexiveChildWriterCustomizer.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/v3po/translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/util/write/ReflexiveChildWriterCustomizer.java b/v3po/translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/util/write/ReflexiveChildWriterCustomizer.java
index ba67e560c..79cdf62c3 100644
--- a/v3po/translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/util/write/ReflexiveChildWriterCustomizer.java
+++ b/v3po/translate-utils/src/main/java/io/fd/honeycomb/v3po/translate/util/write/ReflexiveChildWriterCustomizer.java
@@ -46,8 +46,8 @@ public class ReflexiveChildWriterCustomizer<C extends DataObject> extends NoopWr
try {
return method.isPresent()
- ? Optional.of((C) method.get().invoke(parentData))
- : Optional.<C>absent();
+ ? Optional.fromNullable((C) method.get().invoke(parentData))
+ : Optional.absent();
} catch (IllegalAccessException | InvocationTargetException e) {
throw new IllegalArgumentException("Unable to get " + currentType + " from " + parentData, e);
}