From f2e5782bcbf0044f083f89f8f72f2e88da675d3f Mon Sep 17 00:00:00 2001 From: Robert Lemmen Date: Wed, 18 Apr 2018 13:41:41 +0200 Subject: [PATCH] treat boxed Boolean fields like primitive ones https://github.com/sai-pullabhotla/catatumbo/issues/199 --- .../java/com/jmethods/catatumbo/impl/IntrospectionUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/jmethods/catatumbo/impl/IntrospectionUtils.java b/src/main/java/com/jmethods/catatumbo/impl/IntrospectionUtils.java index 2210358..98142ce 100644 --- a/src/main/java/com/jmethods/catatumbo/impl/IntrospectionUtils.java +++ b/src/main/java/com/jmethods/catatumbo/impl/IntrospectionUtils.java @@ -109,7 +109,8 @@ public static PropertyMetadata getPropertyMetadata(Field field) { public static MethodHandle findReadMethodHandle(Field field) { String readMethodName; MethodHandle mh = null; - if (boolean.class.equals(field.getType())) { + if (boolean.class.equals(field.getType()) + || Boolean.class.equals(field.getType())) { readMethodName = IntrospectionUtils.getReadMethodNameForBoolean(field); mh = findInstanceMethod(field.getDeclaringClass(), readMethodName, field.getType()); }