Abhishek6122008 commented on code in PR #6047:
URL: https://github.com/apache/fineract/pull/6047#discussion_r3492755098
##########
fineract-core/src/main/java/org/apache/fineract/infrastructure/core/service/database/JavaType.java:
##########
@@ -361,7 +361,7 @@ public Object parse(String s, String format, Locale locale)
{
case STRING -> s;
case DATETIME -> Timestamp.valueOf(s);
case TIME -> Time.valueOf(s);
- case DATE -> new Date(s);
+ case DATE -> java.sql.Date.valueOf(s);
Review Comment:
Thanks for catching this. I was only replacing it because it's deprecated,
but I didn't properly realize my change was stricter about the date format than
the original hence yes they're not equivalent.
I looked into it more and couldn't find anywhere this parse method is
actually called. And everywhere I saw real date handling, it used the
yyyy-mm-dd format.
So would you prefer I:
Make it use the yyyy-MM-dd format like the rest of the codebase, or
Just remove this unused method instead?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]