mcconnell    2002/12/15 09:48:04

  Modified:    meta/src/java/org/apache/avalon/meta/info Service.java
               meta/src/java/org/apache/avalon/meta/model Profile.java
  Log:
  Imporvements to toString() result.
  
  Revision  Changes    Path
  1.2       +11 -1     
avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/Service.java
  
  Index: Service.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/info/Service.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- Service.java      24 Nov 2002 12:58:26 -0000      1.1
  +++ Service.java      15 Dec 2002 17:48:03 -0000      1.2
  @@ -202,4 +202,14 @@
   
           return match;
       }
  +
  +    /**
  +     * Returns a string representation of the service.
  +     * @return a string representation
  +     */
  +    public String toString()
  +    {
  +        return getClassname() + ":" + getVersion();
  +    }
  +
   }
  
  
  
  1.6       +4 -11     
avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Profile.java
  
  Index: Profile.java
  ===================================================================
  RCS file: 
/home/cvs/avalon-sandbox/meta/src/java/org/apache/avalon/meta/model/Profile.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Profile.java      11 Dec 2002 05:16:38 -0000      1.5
  +++ Profile.java      15 Dec 2002 17:48:03 -0000      1.6
  @@ -262,18 +262,11 @@
   
           if( null == name )
           {
  -            m_name = type.getInfo().getName() + "-" + 
System.identityHashCode( this );
  +            m_name = type.getInfo().getName();
           }
           else
           {
  -            if( !mode.equals( Mode.EXPLICIT ) )
  -            {
  -                m_name = name + "-" + System.identityHashCode( this );
  -            }
  -            else
  -            {
  -                m_name = name;
  -            }
  +            m_name = name;
           }
   
           if( null == categories )
  @@ -393,7 +386,7 @@
       public String toString()
       {
           
  -        return "[" + getName() + "] " + getType().toString();
  +        return "[" + getName() + "]";
       }
   
       /**
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to