]
Gail Badner resolved HHH-6499.
------------------------------
Resolution: Fixed
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: