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-myrmidon/framework/src/java/org/apache/myrmidon/framework AbstractContainerTask.java
Date Sun, 30 Jun 2002 10:14:58 GMT
donaldp     2002/06/30 03:14:57

  Modified:    framework/src/java/org/apache/myrmidon/framework
                        AbstractContainerTask.java
  Log:
  Correct some terminology
  
  Revision  Changes    Path
  1.13      +9 -9      jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java
  
  Index: AbstractContainerTask.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant-myrmidon/framework/src/java/org/apache/myrmidon/framework/AbstractContainerTask.java,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- AbstractContainerTask.java	30 Jun 2002 10:12:41 -0000	1.12
  +++ AbstractContainerTask.java	30 Jun 2002 10:14:57 -0000	1.13
  @@ -183,8 +183,7 @@
           try
           {
               final RoleInfo role = getRoleByType( roleType );
  -            final TypeFactory typeFactory = getTypeFactory( role.getShortName() );
  -            return typeFactory.create( typeName );
  +            return newInstance( role.getShortName(), typeName );
           }
           catch( Exception e )
           {
  @@ -197,18 +196,19 @@
       /**
        * Create an instance of type with specified type and in specified role.
        */
  -    protected final Object newInstance( final String roleName, final String typeName )
  +    protected final Object newInstance( final String shortName,
  +                                        final String typeName )
           throws TaskException
       {
           try
           {
  -            final TypeFactory typeFactory = getTypeFactory( roleName );
  +            final TypeFactory typeFactory = getTypeFactory( shortName );
               return typeFactory.create( typeName );
           }
           catch( final Exception e )
           {
               final String message =
  -                REZ.getString( "container.no-create-type.error", roleName, typeName );
  +                REZ.getString( "container.no-create-type.error", shortName, typeName );
               throw new TaskException( message, e );
           }
       }
  @@ -233,17 +233,17 @@
       /**
        * Locates a type factory.
        */
  -    private final TypeFactory getTypeFactory( final String roleName )
  +    private final TypeFactory getTypeFactory( final String shortName )
           throws TaskException
       {
           try
           {
               final TypeManager typeManager = (TypeManager)getService( TypeManager.class
);
  -            return typeManager.getFactory( roleName );
  +            return typeManager.getFactory( shortName );
           }
           catch( final TypeException te )
           {
  -            final String message = REZ.getString( "container.no-factory.error", roleName
);
  +            final String message = REZ.getString( "container.no-factory.error", shortName
);
               throw new TaskException( message, te );
           }
       }
  
  
  

--
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