summaryrefslogtreecommitdiffstats
path: root/v3po/translate-utils/src
diff options
context:
space:
mode:
authorMaros Marsalek <mmarsale@cisco.com>2016-05-26 14:24:00 +0200
committerMarek Gradzki <mgradzki@cisco.com>2016-05-30 12:56:58 +0000
commite78326418cc149f7c90827b3d0be49eaeca54dae (patch)
treeb444590611926e0bbca26af3eae7a7047457b446 /v3po/translate-utils/src
parent7b18b6914af4bbb5b8b0deefbd10c0801724d516 (diff)
Expect null in ReflexChildWriterCustomizer
Change-Id: I41311f840bb5e5cdb8911353763fa3c9feb8735a Signed-off-by: Maros Marsalek <mmarsale@cisco.com>
Diffstat (limited to 'v3po/translate-utils/src')
-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);
}