avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier AssemblyVerifier.java Resources.properties
Date Fri, 14 Jun 2002 07:25:31 GMT
donaldp     2002/06/14 00:25:31

  Modified:    containerkit/src/java/org/apache/excalibur/containerkit/verifier
                        AssemblyVerifier.java Resources.properties
  Log:
  Revert last change and make sure that every component specifies dependencies.
  
  Revision  Changes    Path
  1.15      +1 -65     jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/AssemblyVerifier.java
  
  Index: AssemblyVerifier.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/AssemblyVerifier.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- AssemblyVerifier.java	14 Jun 2002 07:23:19 -0000	1.14
  +++ AssemblyVerifier.java	14 Jun 2002 07:25:31 -0000	1.15
  @@ -128,56 +128,6 @@
       }
   
       /**
  -     * Verfiy that the Component type and component meta data agree
  -     * have either both specified dependencies or neither have.
  -     *
  -     * @param components the ComponentMetaData objects for the components
  -     * @throws VerifyException if an error occurs
  -     */
  -    protected void verifyDependencySpecified( final ComponentMetaData[] components )
  -        throws VerifyException
  -    {
  -        for( int i = 0; i < components.length; i++ )
  -        {
  -            verifyDependencySpecified( components[ i ], components );
  -        }
  -    }
  -
  -    /**
  -     * Verfiy that the Component type and component meta data agree
  -     * have either both specified dependencies or neither have.
  -     *
  -     * @param component the ComponentMetaData object for the component
  -     * @param others the ComponentMetaData objects for the other components
  -     * @throws VerifyException if an error occurs
  -     */
  -    protected void verifyDependencySpecified( final ComponentMetaData component,
  -                                               final ComponentMetaData[] others )
  -        throws VerifyException
  -    {
  -        final ComponentInfo info = component.getComponentInfo();
  -        final DependencyDescriptor[] depInfos = info.getDependencies();
  -        final DependencyMetaData[] roles = component.getDependencies();
  -
  -        if( null == depInfos && null != roles )
  -        {
  -            final String message =
  -                REZ.getString( "assembly.null-infos.error",
  -                               info.getComponentDescriptor().getClassname(),
  -                               component.getName() );
  -            throw new VerifyException( message );
  -        }
  -        else if( null != depInfos && null == roles )
  -        {
  -            final String message =
  -                REZ.getString( "assembly.null-deps.error",
  -                               info.getComponentDescriptor().getClassname(),
  -                               component.getName() );
  -            throw new VerifyException( message );
  -        }
  -    }
  -
  -    /**
        * Verfiy that all Components have the needed dependencies specified correctly.
        *
        * @param components the ComponentMetaData objects for the components
  @@ -226,12 +176,6 @@
           throws VerifyException
       {
           final ComponentMetaData[] dependencies = getDependencies( component, components
);
  -        if( null == dependencies )
  -        {
  -            //ie dependencies were not specified
  -            return;
  -        }
  -
           for( int i = 0; i < dependencies.length; i++ )
           {
               final ComponentMetaData dependency = dependencies[ i ];
  @@ -342,10 +286,6 @@
       {
           final ComponentInfo info = component.getComponentInfo();
           final DependencyMetaData[] roles = component.getDependencies();
  -        if( null == roles )
  -        {
  -            return;
  -        }
   
           for( int i = 0; i < roles.length; i++ )
           {
  @@ -553,10 +493,6 @@
       {
           //Make sure all role entries specified in config file are valid
           final DependencyMetaData[] roles = component.getDependencies();
  -        if( null == roles )
  -        {
  -            return;
  -        }
   
           for( int i = 0; i < roles.length; i++ )
           {
  
  
  
  1.6       +0 -2      jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/Resources.properties
  
  Index: Resources.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/containerkit/src/java/org/apache/excalibur/containerkit/verifier/Resources.properties,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- Resources.properties	14 Jun 2002 07:23:19 -0000	1.5
  +++ Resources.properties	14 Jun 2002 07:25:31 -0000	1.6
  @@ -28,5 +28,3 @@
   assembly.unknown-dependency.error=Unknown dependency named "{0}" with role "{1}" declared
for Component {2}.
   assembly.unspecified-dependency.error=Dependency for role "{0}" not specified for the Component
named "{1}".
   assembly.bad-service-class.error=Unable to load service class "{1}" for Component named
"{0}". (Reason: {2}).
  -assembly.null-infos.error=Component type "{0}" does not specify whether it has any dependencies
but the Component "{1}" of that type specifies that it requires dependencies.
  -assembly.null-deps.error=The Component named "{1}" of type "{0}" specifies no dependencies
but the type requires dependencies to be specified.
  \ No newline at end of file
  
  
  

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


Mime
View raw message