Andrus Adamchik created CAY-2804:
------------------------------------
Summary: LocalTimeValueType potential loss of precision
Key: CAY-2804
URL: https://issues.apache.org/jira/browse/CAY-2804
Project: Cayenne
Issue Type: Bug
Affects Versions: 4.2.RC2
Reporter: Andrus Adamchik
Assignee: Nikita Timofeev
Fix For: 4.2
I just ran into a problem (outside Cayenne) when conversion between
"java.sql.Time" and "java.time.LocalTime" in either direction results in the
loss of precision when based on the standard API (Time.valueOf(LocalTime) and
Time.toLocalTime()).
I think out LocalTimeValueType is affected by this problem.
Here is how I addressed it in Agrest:
*
https://github.com/agrestio/agrest/blob/master/agrest-engine/src/main/java/io/agrest/converter/jsonvalue/SqlTimeConverter.java
*
https://github.com/agrestio/agrest/blob/master/agrest-engine/src/main/java/io/agrest/converter/valuestring/SqlTimeConverter.java
Interestingly, no other conversions (like Timestamp to LocalDateTime) are
affected. Their JDK versions are working properly.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)