mcconnell 2003/07/12 06:10:13
Modified: meta/api/src/java/org/apache/avalon/meta/info
Descriptor.java
Log:
Add null test on hashCode implementation.
Revision Changes Path
1.3 +9 -2
avalon-sandbox/meta/api/src/java/org/apache/avalon/meta/info/Descriptor.java
Index: Descriptor.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/meta/api/src/java/org/apache/avalon/meta/info/Descriptor.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- Descriptor.java 10 Jul 2003 21:01:08 -0000 1.2
+++ Descriptor.java 12 Jul 2003 13:10:13 -0000 1.3
@@ -155,7 +155,14 @@
*/
public int hashCode()
{
- return m_attributes.hashCode();
+ if( m_attributes != null )
+ {
+ return m_attributes.hashCode();
+ }
+ else
+ {
+ return 1;
+ }
}
/**
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]