[hibernate-issues] [Hibernate-JIRA] Assigned: (HHH-6499) NPE can be thrown by some implementations of Helper.ValueSourcesAdapter.isIncludedInInsertByDefault() and isIncludedInUpdateByDefault()

Gail Badner (JIRA) noreply at atlassian.com
Thu Jul 28 11:42:14 EDT 2011


     [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6499?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gail Badner reassigned HHH-6499:
--------------------------------

    Assignee: Gail Badner

> NPE can be thrown by some implementations of Helper.ValueSourcesAdapter.isIncludedInInsertByDefault() and isIncludedInUpdateByDefault()
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-6499
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6499
>             Project: Hibernate Core
>          Issue Type: Bug
>          Components: metamodel
>            Reporter: Gail Badner
>            Assignee: Gail Badner
>             Fix For: 4.0.0.next
>
>
> In PropertyAttributeSourceImpl, implementations of Helper.ValueSourcesAdapter.isIncludedInInsertByDefault() and isIncludedInUpdateByDefault() can throw NullPointerException. This is because XMLPropertyElement.isInsert() and isUpdate() returns Boolean, which can be null.
> In VersionAttributeSourceImpl implementation of Helper.ValueSourcesAdapter.isIncludedInInsertByDefault() can throw NullPointerException. This is because XMLHibernateMapping.XMLVersion.isInsert() returns Boolean, which can be null.
> I see 2 alternatives for fixing this:
> 1) change XMLPropertyElement.isInsert(), XMLPropertyElement.isUpdate(), and XMLHibernateMapping.XMLVersion.isInsert() to return a boolean instead of Boolean, with a default of true;
> 2) change the implementations of Helper.ValueSourcesAdapter.isIncludedInInsertByDefault() and isIncludedInUpdateByDefault() in PropertyAttributeSourceImpl and VersionAttributeSourceImpl to return true when the delegated method returns null.
> Which is more appropriate?

--
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