How?
if keyBuffer is null (which it isn't, the constructor initialises it),
String.valueOf( keyBuffer ) would be an NPE as well. toString() should
not return null and won't for a StringBuffer.
- Brett
Henning P. Schmiedehausen wrote:
>[EMAIL PROTECTED] writes:
>
>
>
>> public int hashCode()
>> {
>>- return keyBuffer.hashCode();
>>+ return keyBuffer.toString().hashCode();
>> }
>>
>>
>
>This screams "NullPointerException" all over the place.
>
>How about
>
>public int hashCode() {
> return String.valueOf(keyBuffer).hashCode();
>}
>
> Regards
> Henning
>
>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]