Working with rc2.
The PropertiesHelper class is used to extract primitives from the hibernate-mapping file. Unfortunately, it is implemented so as not to trim the Strings 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
Personally I'm no fan of whitespace, but you know those human readers :-)
I don't have the ability to turn off whitespace generation for one particular element, so I just copied the PropertiesHelper class into my source and added trim() methods. Seems something other could benefit from as well.
|