[
https://issues.apache.org/jira/browse/WICKET-4858?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Grigorov updated WICKET-4858:
------------------------------------
Attachment: WICKET-4858.patch
Here is a patch the consolidates the common code.
It should be OK to be committed in 6.x series too but for some reason I cannot
convince clirr-maven-plugin to see the methods which are left for backward
compatibility.
It complains:
[INFO] --- clirr-maven-plugin:2.5:check (clirr-check) @ wicket-util ---
[INFO] Comparing to version: 6.0.0
[ERROR] org.apache.wicket.util.convert.converter.SqlDateConverter: Return type
of method 'public java.lang.Object convertToObject(java.lang.String,
java.util.Locale)' has been changed to java.util.Date
[ERROR] org.apache.wicket.util.convert.converter.SqlTimeConverter: Return type
of method 'public java.lang.Object convertToObject(java.lang.String,
java.util.Locale)' has been changed to java.util.Date
[ERROR] org.apache.wicket.util.convert.converter.SqlTimestampConverter: Return
type of method 'public java.lang.Object convertToObject(java.lang.String,
java.util.Locale)' has been changed to java.util.Date
While neither the old versions return java.lang.Object nor the new ones return
java.util.Date.
They return the respective type, e.g. java.sql.Date, in both the old and the
new versions as can be seen in the patch.
> Introduce AbstractDateConverter that holds the common code for util.Date,
> sql.Date, sql.Time and sql.Timestamp
> --------------------------------------------------------------------------------------------------------------
>
> Key: WICKET-4858
> URL: https://issues.apache.org/jira/browse/WICKET-4858
> Project: Wicket
> Issue Type: Improvement
> Components: wicket
> Affects Versions: 6.2.0
> Reporter: Martin Grigorov
> Priority: Minor
> Fix For: 7.0
>
> Attachments: WICKET-4858.patch
>
>
> org.apache.wicket.util.convert.converter.DateConverter,
> org.apache.wicket.util.convert.converter.SqlDateConverter,
> org.apache.wicket.util.convert.converter.SqlTimeConverter and
> org.apache.wicket.util.convert.converter.SqlTimestampConverter share some
> common code that can be extracted in a new AbstractDateConverter class.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira