diff --git a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java index ac6091fca..d9e8c22e3 100644 --- a/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java +++ b/openjpa-kernel/src/main/java/org/apache/openjpa/kernel/Filters.java @@ -1075,11 +1075,11 @@ public class Filters { || Time.class.isAssignableFrom(c) || Timestamp.class.isAssignableFrom(c) || Calendar.class.isAssignableFrom(c) - || LocalDate.class.isAssignableFrom(c) - || LocalDateTime.class.isAssignableFrom(c) - || LocalTime.class.isAssignableFrom(c) - || OffsetTime.class.isAssignableFrom(c) - || OffsetDateTime.class.isAssignableFrom(c)); + || LocalDate.class == c // java.time classes are final, so we can compare with == + || LocalDateTime.class == c + || LocalTime.class == c + || OffsetTime.class ==c + || OffsetDateTime.class == c); } public static Object getDefaultForNull(Class nType) {