ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer DefaultPropertyConfigurer.java DefaultObjectConfigurer.java DefaultConfigurer.java DefaultConfigurationState.java
Date Tue, 05 Mar 2002 09:09:34 GMT
donaldp     02/03/05 01:09:34

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer
                        DefaultPropertyConfigurer.java
                        DefaultObjectConfigurer.java DefaultConfigurer.java
                        DefaultConfigurationState.java
  Log:
  Continued the removal of creator cruft
  
  Revision  Changes    Path
  1.6       +3 -11     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultPropertyConfigurer.java
  
  Index: DefaultPropertyConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultPropertyConfigurer.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultPropertyConfigurer.java	5 Mar 2002 08:44:14 -0000	1.5
  +++ DefaultPropertyConfigurer.java	5 Mar 2002 09:09:34 -0000	1.6
  @@ -18,7 +18,7 @@
    * create and set property values.
    *
    * @author <a href="mailto:adammurdoch_ml@yahoo.com">Adam Murdoch</a>
  - * @version $Revision: 1.5 $ $Date: 2002/03/05 08:44:14 $
  + * @version $Revision: 1.6 $ $Date: 2002/03/05 09:09:34 $
    */
   class DefaultPropertyConfigurer
       implements PropertyConfigurer
  @@ -65,21 +65,13 @@
       {
           final DefaultConfigurationState defState = (DefaultConfigurationState)state;
   
  -        // Make sure the supplied object is the pending object
  -        final Object pending = defState.getCreatedObject( m_propIndex );
  -        if( pending != null && pending != value )
  -        {
  -        }
  -
  -        defState.setCreatedObject( m_propIndex, null );
  -
           // Check the property count
  -        if( defState.getPropCount( m_propIndex ) >= m_maxCount )
  +        if( defState.getPropertyCount( m_propIndex ) >= m_maxCount )
           {
               final String message = REZ.getString( "too-many-values.error" );
               throw new ConfigurationException( message );
           }
  -        defState.incPropCount( m_propIndex );
  +        defState.incPropertyCount( m_propIndex );
   
           try
           {
  
  
  
  1.14      +1 -11     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java
  
  Index: DefaultObjectConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultObjectConfigurer.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- DefaultObjectConfigurer.java	5 Mar 2002 08:44:14 -0000	1.13
  +++ DefaultObjectConfigurer.java	5 Mar 2002 09:09:34 -0000	1.14
  @@ -24,7 +24,7 @@
    * of a class.
    *
    * @author <a href="mailto:adammurdoch_ml@yahoo.com">Adam Murdoch</a>
  - * @version $Revision: 1.13 $ $Date: 2002/03/05 08:44:14 $
  + * @version $Revision: 1.14 $ $Date: 2002/03/05 09:09:34 $
    */
   class DefaultObjectConfigurer
       implements ObjectConfigurer
  @@ -263,16 +263,6 @@
       {
           // Make sure there are no pending created objects
           final DefaultConfigurationState defState = (DefaultConfigurationState)state;
  -        final int size = m_allProps.size();
  -        for( int i = 0; i < size; i++ )
  -        {
  -            if( null != defState.getCreatedObject( i ) )
  -            {
  -                final String message = REZ.getString( "pending-property-value.error" );
  -                throw new ConfigurationException( message );
  -            }
  -        }
  -
           return defState.getObject();
       }
   
  
  
  
  1.37      +3 -3      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java
  
  Index: DefaultConfigurer.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurer.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- DefaultConfigurer.java	5 Mar 2002 08:44:14 -0000	1.36
  +++ DefaultConfigurer.java	5 Mar 2002 09:09:34 -0000	1.37
  @@ -33,7 +33,7 @@
    * Class used to configure tasks.
    *
    * @author <a href="mailto:peter@apache.org">Peter Donald</a>
  - * @version $Revision: 1.36 $ $Date: 2002/03/05 08:44:14 $
  + * @version $Revision: 1.37 $ $Date: 2002/03/05 09:09:34 $
    * @ant:type type="configurer" name="default"
    */
   public class DefaultConfigurer
  @@ -298,8 +298,8 @@
           final String name = element.getName();
   
           // Locate the configurer for the child element
  -        final PropertyConfigurer childConfigurer
  -            = getConfigurerFromName( state.getConfigurer(), name, true );
  +        final PropertyConfigurer childConfigurer =
  +            getConfigurerFromName( state.getConfigurer(), name, true );
   
           // Create & configure the child element
           final Object child =
  
  
  
  1.5       +8 -22     jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurationState.java
  
  Index: DefaultConfigurationState.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/configurer/DefaultConfigurationState.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultConfigurationState.java	7 Feb 2002 13:02:19 -0000	1.4
  +++ DefaultConfigurationState.java	5 Mar 2002 09:09:34 -0000	1.5
  @@ -14,24 +14,22 @@
    * methods.
    *
    * @author Adam Murdoch
  - * @version $Revision: 1.4 $ $Date: 2002/02/07 13:02:19 $
  + * @version $Revision: 1.5 $ $Date: 2002/03/05 09:09:34 $
    */
   class DefaultConfigurationState
       implements ConfigurationState
   {
  -    private final int[] m_propCount;
  -    private final Object[] m_createdObjects;
  +    private final int[] m_propertyCount;
       private final ObjectConfigurer m_configurer;
       private final Object m_object;
   
       public DefaultConfigurationState( final ObjectConfigurer configurer,
                                         final Object object,
  -                                      final int numProps )
  +                                      final int propertyCount )
       {
           m_configurer = configurer;
           m_object = object;
  -        m_propCount = new int[ numProps ];
  -        m_createdObjects = new Object[ numProps ];
  +        m_propertyCount = new int[ propertyCount ];
       }
   
       /**
  @@ -49,26 +47,14 @@
       }
   
       /** Returns a property count. */
  -    public int getPropCount( final int propIndex )
  +    public int getPropertyCount( final int index )
       {
  -        return m_propCount[ propIndex ];
  +        return m_propertyCount[ index ];
       }
   
       /** Increments a property count. */
  -    public void incPropCount( final int propIndex )
  +    public void incPropertyCount( final int index )
       {
  -        m_propCount[ propIndex ]++;
  -    }
  -
  -    /** Returns a property's pending objects. */
  -    public Object getCreatedObject( final int propIndex )
  -    {
  -        return m_createdObjects[ propIndex ];
  -    }
  -
  -    /** Sets a property's pending objects. */
  -    public void setCreatedObject( final int propIndex, final Object object )
  -    {
  -        m_createdObjects[ propIndex ] = object;
  +        m_propertyCount[ index ]++;
       }
   }
  
  
  

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message