db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Army <qoz...@sbcglobal.net>
Subject Re: [jira] Updated: (DERBY-675) Build-time processing of "metadata.properties" file handles slashes incorrectly.
Date Thu, 03 Nov 2005 00:42:45 GMT
Daniel John Debrunner wrote:

> Would it be safer to use standard Java character reading classes, rather
> than inventing your own here?
> Use something like
> new LineNumberReader(new InputStreamReader(is, "ISO 8859-1"));
> since property files are defined to be that encoding?

I think there were two reasons why I created a readLine() method instead of 
using an existing Java one: 1) because, for whatever reason, I thought that 
backslashes needed special handling (and hence a standard Java "readLine()" 
wouldn't have worked), and 2) there are some character-related operations that 
have to be done (esp. right-side trimming to find the last non-whitespace 
character) and I thought that it'd be cleaner to do that character processing 
while reading, instead of getting a string and processing it character by character.

But now that reason #1 is void and since reason #2 isn't really much of a 
reason, Yes, it would be safer to use standarad Java character reading classes. 
  I'll make that change and post a patch soon.


View raw message