commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Henning P. Schmiedehausen" <...@intermeta.de>
Subject Re: svn commit: r233505 - in /jakarta/commons/proper/configuration/trunk/src:
Date Mon, 22 Aug 2005 06:32:35 GMT
oheger@apache.org 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


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message