db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel John Debrunner <...@apache.org>
Subject Re: [jira] Updated: (DERBY-326) Improve streaming of large objects for network server and client
Date Thu, 05 Jan 2006 18:33:45 GMT
David W. Van Couvering wrote:

> 
> 
> Bryan Pendleton wrote:
> 
>>
>> 2) It seems like it might be possible to improve these lines in
>>    ReEncodedInputStream.java:
>>
>>         if(reader == null){
>>             throw new NullPointerException();
>>         }
>>
>>         if(enc == null){
>>             throw new NullPointerException();
>>         }
>>
>>    I think it would be better to pass a string to the exception
>>    constructor, indicating which variable was null, as in:
>>
>>             throw new NullPointerException(
>>                 "null 'reader' passed to ReEncodedInputStream");
> 

Actually, I'd be interested to know why such tests are required? Why is
there a need to throw a NPE if a parameter or variable is null?

It's not a coding style I like.

Dan.


Mime
View raw message