----- Original Message -----
From: "Marcos Sanz/Denic" <[EMAIL PROTECTED]>
> Hi,
>
> I have some NullPointerExceptions in my log file because of this line:
>
> final String readCommandLine() throws IOException {
> return inReader.readLine().trim();
> }
>
> Wouldn't it be much smarter:
>
> final String readCommandLine() throws IOException {
> String line = inReader.readLine();
> if (null == line)
> return null
> else
> return line.trim();
> }
>
> I don't think it breaks any code this way.
Marcos,
Thanks, can you file this as a bug in bugzilla?
I'm planning to remove the use of the Reader since it creates a buffering
issue. This will hopefully obviate the null pointer check.
Serge Knystautas
Loki Technologies
http://www.lokitech.com/
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>