CVS: jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util ConfigUtil.java,1.5,1.6
Peter Donald <pdonald-yCVjj/[email protected]> Wed, 3 Dec 2003 03:11:54 -0600
| Newsgroups | gmane.comp.java.jcontainer.cvs |
|---|---|
| Message-ID | <[email protected]> |
Update of /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util
In directory hogshead.codehaus.org:/tmp/cvs-serv16736/engine/src/java/org/jcontainer/loom/components/util
Modified Files:
ConfigUtil.java
Log Message:
Use equals implementation in ConfigurationUtil and remove unsed version in ConfigUtil
Index: ConfigUtil.java
===================================================================
RCS file: /cvsroot/jcontainer/jcontainer/loom/engine/src/java/org/jcontainer/loom/components/util/ConfigUtil.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- ConfigUtil.java 3 Dec 2003 03:37:57 -0000 1.5
+++ ConfigUtil.java 3 Dec 2003 09:11:21 -0000 1.6
@@ -64,66 +64,6 @@
return output;
}
- /**
- * @deprecated Use ConfigurationUtil on next DNA release
- */
- public static boolean equals( final Configuration configuration1,
- final Configuration configuration2 )
- {
- final Configuration[] children1 = configuration1.getChildren();
- final Configuration[] children2 = configuration2.getChildren();
- if( children1.length != children2.length )
- {
- return false;
- }
- else
- {
- for( int i = 0; i < children1.length; i++ )
- {
- if( !equals( children1[ i ], children2[ i ] ) )
- {
- return false;
- }
- }
- }
-
- final String[] names1 = configuration1.getAttributeNames();
- final String[] names2 = configuration2.getAttributeNames();
- if( names1.length != names2.length )
- {
- return false;
- }
- else
- {
- for( int i = 0; i < names1.length; i++ )
- {
- final String value1 =
- configuration1.getAttribute( names1[ i ], null );
- final String value2 =
- configuration2.getAttribute( names1[ i ], null );
- if( !value1.equals( value2 ) )
- {
- return false;
- }
- }
- }
-
- final String value1 = configuration1.getValue( null );
- final String value2 = configuration2.getValue( null );
- if( null == value1 && null == value2 )
- {
- return true;
- }
- else if( null != value1 && null != value2 )
- {
- return value1.equals( value2 );
- }
- else
- {
- return false;
- }
- }
-
public static void copy( final DefaultConfiguration newConfiguration,
final Configuration configuration )
throws ConfigurationException