Čedomir Igaly (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNWJkNjZiNWIw...
) / Improvement (
https://hibernate.atlassian.net/browse/HHH-13893?atlOrigin=eyJpIjoiNWJkNj...
) HHH-13893 (
https://hibernate.atlassian.net/browse/HHH-13893?atlOrigin=eyJpIjoiNWJkNj...
) ConfigurationHelper can not convert value from integer to long and vice versa (
https://hibernate.atlassian.net/browse/HHH-13893?atlOrigin=eyJpIjoiNWJkNj...
)
Issue Type: Improvement Affects Versions: 5.4.12 Assignee: Unassigned Attachments:
ConfigurationHelper.java.diff, NumberPropertyConversionTest.java Components:
hibernate-core Created: 07/Mar/2020 02:41 AM Priority: Minor Reporter: Čedomir Igaly (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=557058%...
)
When calling ConfigurationHelper.getLong with values map containing integer value under
key 'name', it will throw ConfigurationException. Similarily, same exception is
thrown if either getInt or getInteger is called with long value under key 'name'.
Simple test case is attached to demonstrate this behaviour.
Suggested solution to problem above is to use longValue / intValue methods in
java.lang.Number class. Suggested patch is attached.
Pull request on Github will be created.
(
https://hibernate.atlassian.net/browse/HHH-13893#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-13893#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100121- sha1:b4d24b6 )