bloritsch 2003/07/10 07:47:00
Modified: meta/spi/src/java/org/apache/avalon/meta/info
Descriptor.java
Log:
Again simplify the code. No reason to have a private compare() method if it is only
used in one place.
Revision Changes Path
1.4 +5 -13
avalon-sandbox/meta/spi/src/java/org/apache/avalon/meta/info/Descriptor.java
Index: Descriptor.java
===================================================================
RCS file:
/home/cvs/avalon-sandbox/meta/spi/src/java/org/apache/avalon/meta/info/Descriptor.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Descriptor.java 10 Jul 2003 14:41:56 -0000 1.3
+++ Descriptor.java 10 Jul 2003 14:47:00 -0000 1.4
@@ -142,7 +142,10 @@
{
if( other instanceof Descriptor )
{
- return compare( this, (Descriptor) other );
+ Descriptor descriptor = (Descriptor)other;
+ if (null == m_attributes) return null == descriptor.m_attributes;
+
+ return m_attributes.equals(descriptor.m_attributes);
}
return false;
}
@@ -163,16 +166,5 @@
protected Properties getProperties()
{
return m_attributes;
- }
-
-
- private static boolean compare( Descriptor primary, Descriptor secondary )
- {
- if ( null == primary.m_attributes )
- {
- return null == secondary.m_attributes;
- }
-
- return primary.m_attributes.equals(secondary.m_attributes);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]