avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/meta-spi/src/test/org/apache/avalon/meta/data/test ConstructorDirectiveTestCase.java ParameterTestCase.java
Date Mon, 14 Jul 2003 22:07:29 GMT
mcconnell    2003/07/14 15:07:28

  Modified:    merlin   maven.xml project.xml
               merlin/merlin-platform project.xml
               merlin/meta/src/java/org/apache/avalon/meta/data/builder
                        XMLDeploymentProfileCreator.java
               merlin/meta-spi/src/java/org/apache/avalon/meta/data
                        ConstructorDirective.java Parameter.java
               merlin/meta-spi/src/java/org/apache/avalon/meta/model
                        Parameter.java
               merlin/meta-spi/src/test/org/apache/avalon/meta/data/test
                        ConstructorDirectiveTestCase.java
                        ParameterTestCase.java
  Log:
  Housekeeping.
  
  Revision  Changes    Path
  1.27      +4 -2      avalon-sandbox/merlin/maven.xml
  
  Index: maven.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/maven.xml,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- maven.xml	9 Jul 2003 13:06:22 -0000	1.26
  +++ maven.xml	14 Jul 2003 22:07:27 -0000	1.27
  @@ -31,7 +31,7 @@
       <maven:reactor
         basedir="${basedir}"
         includes="*/project.xml,merlin-extensions/merlin-jmx/project.xml,merlin-extensions/merlin-jndi/project.xml,merlin-extensions/merlin-servlet/project.xml"
  -      excludes="merlin-platform/*,merlin-plugin/*"
  +      excludes="merlin-platform/*,merlin-plugin/*,activation-spi/*,activation/*"
         goals="merlin-propergate"
         banner="Installing:"
         ignoreFailures="false" />
  @@ -236,8 +236,10 @@
           <sourcepath path="${basedir}/../meta/src/java"/>
           <sourcepath path="${basedir}/../extension-spi/src/java"/>
           <sourcepath path="${basedir}/../extension/src/java"/>
  +        <!--
           <sourcepath path="${basedir}/../activation-spi/src/java"/>
           <sourcepath path="${basedir}/../activation/src/java"/>
  +        -->
           <sourcepath path="${basedir}/../composition-spi/src/java"/>
           <sourcepath path="${basedir}/../composition/src/java"/>
           <sourcepath path="${basedir}/../assembly-spi/src/java"/>
  @@ -286,7 +288,7 @@
       <maven:reactor
         basedir="${basedir}"
         includes="*/project.xml,merlin-extensions/*/project.xml"
  -      excludes="merlin-platform/*"
  +      excludes="merlin-platform/*,activation-spi/*,activation/*"
         goals="clean"
         banner="Cleaning subproject:"
         ignoreFailures="false"/>
  
  
  
  1.23      +2 -2      avalon-sandbox/merlin/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/project.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- project.xml	14 Jul 2003 04:49:36 -0000	1.22
  +++ project.xml	14 Jul 2003 22:07:27 -0000	1.23
  @@ -52,7 +52,7 @@
         <email>mcconnell@apache.org</email>
         <organization>OSM</organization>
         <roles>
  -        <role>Architecture and development.</role>
  +        <role>Release Manager.</role>
         </roles>
       </developer>
       <developer>
  @@ -68,7 +68,7 @@
         <id>bloritsch</id>
         <email>bloritsch@apache.org</email>
         <roles>
  -        <role>Code enhancements.</role>
  +        <role>Code enhancements and lots of test cases.</role>
         </roles>
       </developer>
       <developer>
  
  
  
  1.11      +4 -0      avalon-sandbox/merlin/merlin-platform/project.xml
  
  Index: project.xml
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/merlin-platform/project.xml,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- project.xml	12 Jul 2003 21:10:46 -0000	1.10
  +++ project.xml	14 Jul 2003 22:07:28 -0000	1.11
  @@ -46,6 +46,7 @@
         <version>SNAPSHOT</version>
       </dependency>
   
  +    <!--
       <dependency>
         <groupId>avalon</groupId>
         <artifactId>avalon-activation-spi</artifactId>
  @@ -56,6 +57,7 @@
         <artifactId>avalon-activation</artifactId>
         <version>1.0</version>
       </dependency>
  +    -->
   
       <dependency>
         <groupId>avalon</groupId>
  @@ -156,6 +158,7 @@
         <title>Merlin Service Management Platform</title>
         <packages>org.apache.avalon.merlin.*</packages>
       </packageGroup>
  +    <!--
       <packageGroup>
         <title>Avalon Assembly Framework</title>
         <packages>org.apache.avalon.assembly.*</packages>
  @@ -164,6 +167,7 @@
         <title>Avalon Activation Framework</title>
         <packages>org.apache.avalon.activation.*</packages>
       </packageGroup>
  +    -->
       <packageGroup>
         <title>Avalon Composition Framework</title>
         <packages>org.apache.avalon.composition.*</packages>
  
  
  
  1.5       +10 -10    avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/data/builder/XMLDeploymentProfileCreator.java
  
  Index: XMLDeploymentProfileCreator.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta/src/java/org/apache/avalon/meta/data/builder/XMLDeploymentProfileCreator.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XMLDeploymentProfileCreator.java	10 Jul 2003 19:42:07 -0000	1.4
  +++ XMLDeploymentProfileCreator.java	14 Jul 2003 22:07:28 -0000	1.5
  @@ -227,15 +227,16 @@
                   if( paramsConf.length > 0 )
                   {
                       Parameter[] params = getParameters( paramsConf );
  -                    list.add( 
  -                      new ConstructorDirective( 
  -                        key, classname, params ) );
  +                    ConstructorDirective constructor = 
  +                      new ConstructorDirective( key, classname, params );
  +                    list.add( constructor );
                   }
                   else
                   {
  -                    list.add( 
  +                    ConstructorDirective constructor = 
                         new ConstructorDirective( 
  -                        key, classname, child.getValue() ) );
  +                        key, classname, (String) child.getValue( null ) );
  +                    list.add( constructor );
                   }
               }
               else
  @@ -278,17 +279,16 @@
           throws ConfigurationException
       {
           String classname = config.getAttribute( "class", "java.lang.String" );
  -        String value = config.getValue( null );
  -        if( value != null )
  +        Configuration[] params = config.getChildren( "param" );
  +        if( params.length == 0 )
           {
  +            String value = config.getValue( null );
               return new Parameter( classname, value );
           }
           else
           {
  -            Configuration[] params = config.getChildren( "param" );
               Parameter[] parameters = getParameters( params );
               return new Parameter( classname, parameters );
           }
       }
  -
   }
  
  
  
  1.2       +5 -11     avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/data/ConstructorDirective.java
  
  Index: ConstructorDirective.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/data/ConstructorDirective.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConstructorDirective.java	10 Jul 2003 19:41:21 -0000	1.1
  +++ ConstructorDirective.java	14 Jul 2003 22:07:28 -0000	1.2
  @@ -123,17 +123,14 @@
         final String key, final String classname, final String value )
       {
           super( key );
  +
           if( null == classname )
           {
               throw new NullPointerException( "classname" );
           }
  -        if( null == value )
  -        {
  -            throw new NullPointerException( "value" );
  -        }
   
           m_params = new Parameter[0];
  -        m_classname = "java.lang.String";
  +        m_classname = classname;
           m_argument = value;
       }
   
  @@ -158,6 +155,7 @@
         final String key, final String classname, final Parameter[] params )
       {
           super( key );
  +
           if( null == params )
           {
               throw new NullPointerException( "parameters" );
  @@ -166,10 +164,6 @@
           {
               throw new NullPointerException( "classname" );
           }
  -        if( params.length == 0 )
  -        {
  -            throw new IllegalArgumentException( "parameters" );
  -        }
   
           m_classname = classname;
           m_params = params;
  @@ -195,7 +189,7 @@
       }
   
       /**
  -     * Return the constructor classname
  +     * Return the constructor classname (may be null)
        * @return the classname
        */
       public String getArgument()
  
  
  
  1.3       +2 -12     avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/data/Parameter.java
  
  Index: Parameter.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/data/Parameter.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Parameter.java	10 Jul 2003 19:41:21 -0000	1.2
  +++ Parameter.java	14 Jul 2003 22:07:28 -0000	1.3
  @@ -122,11 +122,6 @@
        */
       public Parameter( final String value )
       {
  -        if( null == value )
  -        {
  -            throw new NullPointerException( "value" );
  -        }
  -
           m_classname = "java.lang.String";
           m_parameters = new Parameter[ 0 ];
           m_argument = value;
  @@ -139,11 +134,6 @@
        */
       public Parameter( final String classname, final String value )
       {
  -        if( null == value )
  -        {
  -            throw new NullPointerException( "value" );
  -        }
  -
           if( null == classname )
           {
               throw new NullPointerException( "classname" );
  @@ -184,7 +174,7 @@
       }
   
       /**
  -     * Return the argument.
  +     * Return the argument (may be null).
        */
       public String getArgument()
       {
  
  
  
  1.5       +2 -9      avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/Parameter.java
  
  Index: Parameter.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/java/org/apache/avalon/meta/model/Parameter.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- Parameter.java	9 Jul 2003 17:36:49 -0000	1.4
  +++ Parameter.java	14 Jul 2003 22:07:28 -0000	1.5
  @@ -121,8 +121,6 @@
        */
       public Parameter( final String value )
       {
  -        if ( null == value ) throw new NullPointerException( "value" );
  -
           m_parameters = new Parameter[0];
           m_classname = "java.lang.String";
           m_argument = value;
  @@ -139,12 +137,7 @@
           {
               throw new NullPointerException( "classname" );
           }
  -
  -        if ( null == value )
  -        {
  -            throw new NullPointerException( "value" );
  -        }
  -
  +
           m_parameters = new Parameter[0];
           m_classname = classname;
           m_argument = value;
  
  
  
  1.2       +2 -2      avalon-sandbox/merlin/meta-spi/src/test/org/apache/avalon/meta/data/test/ConstructorDirectiveTestCase.java
  
  Index: ConstructorDirectiveTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/test/org/apache/avalon/meta/data/test/ConstructorDirectiveTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ConstructorDirectiveTestCase.java	10 Jul 2003 19:41:21 -0000	1.1
  +++ ConstructorDirectiveTestCase.java	14 Jul 2003 22:07:28 -0000	1.2
  @@ -123,11 +123,11 @@
           try
           {
               new ConstructorDirective( key, (String) null );
  -            fail( "Did not throw expected NullPointerException" );
  +            // Success!!
           }
           catch ( NullPointerException npe )
           {
  -            // Success!!
  +            fail( "Null argument is valid." );
           }
   
           try
  
  
  
  1.2       +7 -7      avalon-sandbox/merlin/meta-spi/src/test/org/apache/avalon/meta/data/test/ParameterTestCase.java
  
  Index: ParameterTestCase.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/meta-spi/src/test/org/apache/avalon/meta/data/test/ParameterTestCase.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ParameterTestCase.java	10 Jul 2003 19:41:21 -0000	1.1
  +++ ParameterTestCase.java	14 Jul 2003 22:07:28 -0000	1.2
  @@ -82,17 +82,17 @@
           try
           {
               new Parameter(null);
  -            fail("Did not throw expected NullPointerException/1");
  +            // Success!!
           }
           catch (NullPointerException npe)
           {
  -            // Success!!
  +            fail("Null signifes a null argument.");
           }
   
           try
           {
               new Parameter( null, value );
  -            fail( "Did not throw expected NullPointerException/2" );
  +            fail( "Null classname must throw a NullPointerException" );
           }
           catch ( NullPointerException npe )
           {
  @@ -102,17 +102,17 @@
           try
           {
               new Parameter( className, (String)null );
  -            fail( "Did not throw expected NullPointerException/3" );
  +            // Success!!
           }
           catch ( NullPointerException npe )
           {
  -            // Success!!
  +            fail( "Null argument is a valid argument." );
           }
   
           try
           {
               new Parameter( null, params );
  -            fail( "Did not throw expected NullPointerException/4" );
  +            fail( "NullPointerException must be thrown for a null classname." );
           }
           catch ( NullPointerException npe )
           {
  @@ -122,7 +122,7 @@
           try
           {
               new Parameter( className, (Parameter[]) null );
  -            fail( "Did not throw expected NullPointerException/5" );
  +            fail( "NullPointerException must be thorwn for null parameters." );
           }
           catch ( NullPointerException npe )
           {
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message