avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: avalon-sandbox/meta/spi/src/java/org/apache/avalon/meta/info Descriptor.java
Date Thu, 10 Jul 2003 14:47:00 GMT
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: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message