]
Steve Ebersole closed HHH-1153.
-------------------------------
Closing stale resolved issues
PropertiesHelper fails reading primitive values from
hibernate-mapping when doc has whitespace
----------------------------------------------------------------------------------------------
Key: HHH-1153
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1153
Project: Hibernate Core
Issue Type: Improvement
Environment: rc2. Any database.
Reporter: Rich MacDonald
Fix For: 3.1
The PropertiesHelper class is used to extract primitives from the hibernate-mapping file.
Unfortunately, it is implemented so as not to trim the values that are read from the file.
So something like PropertiesHelper.getInt() will fail with a NumberFormatException if the
argument contains white-space before or after the "int" value.
For those of us who generate our hibernate-mappings with whitespace, this is a problem.
For example, my hilo spec written as:
<param
name="max_lo">
512
</param>
will fail. It needs to be written as:
<param name="max_lo">512</param>
i.e., no whitespace between the >512< portion
I autogenerate my hibernate-mapping files, and whitespace is all or nothing for me, and
since people read it... ;-)
The simple fix is to add trim() methods in the relevant methods of the PropertiesHelper
class. A few min work for me, but I believe others would benefit as well.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: