Hibernate Enumerations throw NullPointerException on nullSafeGet ----------------------------------------------------------------
Key: HIB-152 URL: http://jira.andromda.org/browse/HIB-152 Project: Hibernate Cartridge Type: Bug Versions: 3.1-RC1 Environment: All Reporter: Zach B Assigned to: Carlos Cuenca Priority: Minor Hibernate enumerations throw a NullPointerException when trying to retrieve non-existent primitive-wrapped values from a ResultSet during nullSafeGet(ResultSet, String[], Object) call. This is because the existing code retrieves and attempts to unwrap the value from the ResultSet before checking if it is null. If non-primitive literals are used, the code works because no unwrapping is attempted. I have attached a patch for HibernateEnumeration.vsl to fix this, but do not know in what format to create a unit test to show the problem, or that the patch fixes it. Workarounds include making the underlying datatype of an enumeration to be a true Java object like Integer, instead of a primitive, or ensuring that a value gets created for the enumerated type. ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click