-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: PropertiesHelper class unfriendly to whitespace
PostPosted: Wed Nov 02, 2005 6:25 pm 
Beginner
Beginner

Joined: Sat Oct 29, 2005 2:05 am
Posts: 21
Location: Kansas City, KS
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.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Nov 02, 2005 6:31 pm 
Hibernate Team
Hibernate Team

Joined: Tue Aug 26, 2003 3:00 pm
Posts: 1816
Location: Austin, TX
Create an enhancement request in JIRA. That seems reasonable.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.