You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by le...@apache.org on 2002/08/05 13:53:24 UTC

cvs commit: jakarta-avalon-excalibur/instrument/src/manager/org/apache/excalibur/instrument/manager InstrumentableProxy.java InstrumentProxy.java

leif        2002/08/05 04:53:24

  Modified:    instrument/src/manager/org/apache/excalibur/instrument/manager
                        InstrumentableProxy.java InstrumentProxy.java
  Log:
  Fix a problem where configured instrument elements were not getting the correct
  default description when a description was ommitted from the configuration file.
  
  Revision  Changes    Path
  1.3       +3 -3      jakarta-avalon-excalibur/instrument/src/manager/org/apache/excalibur/instrument/manager/InstrumentableProxy.java
  
  Index: InstrumentableProxy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/instrument/src/manager/org/apache/excalibur/instrument/manager/InstrumentableProxy.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InstrumentableProxy.java	3 Aug 2002 15:00:38 -0000	1.2
  +++ InstrumentableProxy.java	5 Aug 2002 11:53:24 -0000	1.3
  @@ -117,8 +117,8 @@
       {
           synchronized( this )
           {
  -            // The description is optional
  -            m_description = configuration.getAttribute( "description", m_name );
  +            // The description is optional.  Default to the description from the constructor.
  +            m_description = configuration.getAttribute( "description", m_description );
   
               if( getLogger().isDebugEnabled() )
               {
  
  
  
  1.3       +7 -4      jakarta-avalon-excalibur/instrument/src/manager/org/apache/excalibur/instrument/manager/InstrumentProxy.java
  
  Index: InstrumentProxy.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/instrument/src/manager/org/apache/excalibur/instrument/manager/InstrumentProxy.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- InstrumentProxy.java	3 Aug 2002 15:00:38 -0000	1.2
  +++ InstrumentProxy.java	5 Aug 2002 11:53:24 -0000	1.3
  @@ -130,8 +130,8 @@
       {
           synchronized(this)
           {
  -            // The description is optional
  -            m_description = configuration.getAttribute( "description", m_name );
  +            // The description is optional.  Default to the description from the constructor.
  +            m_description = configuration.getAttribute( "description", m_description );
               
               if ( getLogger().isDebugEnabled() )
               {
  @@ -157,7 +157,10 @@
                   String sampleName = InstrumentSampleUtils.generateFullInstrumentSampleName(
                       m_name, sampleType, sampleInterval, sampleSize );
                   
  -                String sampleDescription = sampleConf.getAttribute( "description", sampleName );
  +                String defaultDescription = InstrumentSampleUtils.generateInstrumentSampleName(
  +                    sampleType, sampleInterval, sampleSize );
  +                String sampleDescription =
  +                    sampleConf.getAttribute( "description", defaultDescription );
                   
                   if ( getLogger().isDebugEnabled() )
                   {
  
  
  

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>