db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Matrigali <mikem_...@sbcglobal.net>
Subject Re: [jira] Updated: (DERBY-326) Improve streaming of large objects for network server and client
Date Fri, 06 Jan 2006 17:34:27 GMT
Yes, if it is a code bug case trying to be caught then using of
asserts to provide more info in debug mode is fine with me.  And no
need to internationalize.

Daniel John Debrunner wrote:
> 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