[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5968) Deprecate nullSafeGet()/nullSafeSet() methods with no SessionImplementor argument from UserType and AbstractSingleColumnStandardBasicType
Baron Roberts (JIRA)
noreply at atlassian.com
Sat Sep 17 14:21:38 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=43633#comment-43633 ]
Baron Roberts commented on HHH-5968:
------------------------------------
So what is the solution for 3.6.x developers to avoid javac spewing "Note"'s even when SuppressWarnings("deprecation") is used as well as Xlint:-deprecation? I have already spent a number of hours trying to work around this. I do not like having to globally turn off a compiler check just for a single interface. It just does not make sense to me that Hibernate handles deprecations differently from all other projects I have encountered. I appreciate that this is a Hibernate team policy but please provide a workaround for 3.6.x developers so that their code is not using deprecated methods.
> Deprecate nullSafeGet()/nullSafeSet() methods with no SessionImplementor argument from UserType and AbstractSingleColumnStandardBasicType
> -----------------------------------------------------------------------------------------------------------------------------------------
>
> Key: HHH-5968
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5968
> Project: Hibernate Core
> Issue Type: Deprecation
> Components: core
> Reporter: Gail Badner
> Assignee: Gail Badner
> Fix For: 3.6.2
>
>
> UserType.nullSafeGet() and nullSafeSet() methods will be deprecated because they do not take a SessionImplementor argument:
> public Object nullSafeGet(ResultSet rs, String[] names, Object owner)
> public void nullSafeSet(PreparedStatement st, Object value, int index)
> They will be replaced by methods taking a SessionImplementor argument in Hibernate 4. These new methods will not be added to UserType because doing so would break everyone's UserType implementation.
> In AbstractSingleColumnStandardBasicType, the following methods will be deprecated:
> public T nullSafeGet(ResultSet rs, String name)
> public Object get(ResultSet rs, String name)
> public void nullSafeSet(PreparedStatement st, T value, int index)
> public void set(PreparedStatement st, T value, int index)
> These methods should have been deprecated in AbstractSingleColumnStandardBasicType when their super methods in SingleColumnType were deprecated (the deprecation did not come across in Javadoc generated by {@inheritDoc}).
> The following methods should be used instead:
> AbstractSingleColumnStandardBasicType.nullSafeSet(PreparedStatement st, Object value, int index, boolean[] settable, SessionImplementor session)
> AbstractStandardBasicType.nullSafeGet(ResultSet rs, String name, SessionImplementor session, Object owner)
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list