diff --git a/CHANGELOG.md b/CHANGELOG.md index 24af3d81242defb0f33227c5ba9e614f4131217d..d6040ffd1e79a17d0df3d61ba71b8380e9e8dd59 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * Updated the following dependencies * tinkergraph-gremlin: 3.2.4 -> 3.2.5 +* Methods set with the Property annotation now accept null values. ## 3.0.3 diff --git a/src/main/java/com/syncleus/ferma/framefactories/annotation/PropertyMethodHandler.java b/src/main/java/com/syncleus/ferma/framefactories/annotation/PropertyMethodHandler.java index 0f1832db9e8c8b34310e3f99bab9d7231d863f69..ff3bcf7d8847eee2dba72f35efe18e30edf53f49 100644 --- a/src/main/java/com/syncleus/ferma/framefactories/annotation/PropertyMethodHandler.java +++ b/src/main/java/com/syncleus/ferma/framefactories/annotation/PropertyMethodHandler.java @@ -108,7 +108,7 @@ public class PropertyMethodHandler implements MethodHandler { final Property annotation = ((CachesReflection) thiz).getReflectionCache().getAnnotation(method, Property.class); final String value = annotation.value(); - if (obj.getClass().isEnum()) + if ((obj != null) && (obj.getClass().isEnum())) thiz.setProperty(value, ((Enum<?>) obj).name()); else thiz.setProperty(value, obj);