This is an automated email from the ASF dual-hosted git repository. struberg pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/openjpa.git
commit 76225267d90f9abe559dc63a7f5f74a1aa5bcd93 Author: Mark Struberg <strub...@apache.org> AuthorDate: Fri Apr 2 20:46:41 2021 +0200 OPENJPA-2851 simplify comparison since java.time classes are final we can also use == instead of isAssignableFrom --- .../src/main/java/org/apache/openjpa/kernel/Filters.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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 ac6091f..d9e8c22 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) {