mirror of https://github.com/apache/openjpa.git
OPENJPA-2851 simplify comparison
since java.time classes are final we can also use == instead of isAssignableFrom
This commit is contained in:
parent
53cc83eb7e
commit
76225267d9
|
@ -1075,11 +1075,11 @@ public class Filters {
|
||||||
|| Time.class.isAssignableFrom(c)
|
|| Time.class.isAssignableFrom(c)
|
||||||
|| Timestamp.class.isAssignableFrom(c)
|
|| Timestamp.class.isAssignableFrom(c)
|
||||||
|| Calendar.class.isAssignableFrom(c)
|
|| Calendar.class.isAssignableFrom(c)
|
||||||
|| LocalDate.class.isAssignableFrom(c)
|
|| LocalDate.class == c // java.time classes are final, so we can compare with ==
|
||||||
|| LocalDateTime.class.isAssignableFrom(c)
|
|| LocalDateTime.class == c
|
||||||
|| LocalTime.class.isAssignableFrom(c)
|
|| LocalTime.class == c
|
||||||
|| OffsetTime.class.isAssignableFrom(c)
|
|| OffsetTime.class ==c
|
||||||
|| OffsetDateTime.class.isAssignableFrom(c));
|
|| OffsetDateTime.class == c);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Object getDefaultForNull(Class<?> nType) {
|
public static Object getDefaultForNull(Class<?> nType) {
|
||||||
|
|
Loading…
Reference in New Issue