Thank you for the explanation. I took a look at your PR. It will work for converting a timestamp to a LocalDateTime, but I believe the other types should be handled another way as well (i.e. Date.class). And this problem is not limited to the LocalDateTimeJavaDescriptor, but appears also in LocalDateJavaDescriptor. Furthermore, looking at the original LocalDateTimeJavaDescriptor, there are probably some more bugs in the methods wrap and unwrap. If the input value for the method wrap is a java.util.Date (I do not know when this will be the case, but it is probably implemented with a reason), this value is cast to a Timestamp. This will throw a ClassCastException. Another example: unwrapping a value to a java.sql.Date returns a java.util.Date. This can also lead to a class cast exception (a java.sql.Date is a java.util.Date, but not the other way around). I will attach 2 unit tests for testing the wrap and unwrap-methods of LocalDateTimeJavaDescriptor and LocalDateJavaDescriptor. |