You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by do...@apache.org on 2001/06/08 11:09:46 UTC

cvs commit: jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/type DefaultTypeManager.java

donaldp     01/06/08 02:09:46

  Modified:    proposal/myrmidon/src/java/org/apache/myrmidon/components/type
                        DefaultTypeManager.java
  Log:
  Removed decoration of role with "selector" as it was legacy to old implementation.
  
  Revision  Changes    Path
  1.6       +3 -7      jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java
  
  Index: DefaultTypeManager.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- DefaultTypeManager.java	2001/06/03 06:10:05	1.5
  +++ DefaultTypeManager.java	2001/06/08 09:09:45	1.6
  @@ -38,14 +38,14 @@
                                 final TypeFactory factory ) 
           throws TypeException
       {
  -        final MultiSourceTypeFactory msFactory = createFactory( role + "Selector" );
  +        final MultiSourceTypeFactory msFactory = createFactory( role );
           msFactory.register( shorthandName, factory );
       }
   
       public TypeFactory getFactory( final String role )
           throws TypeException
       {
  -        return createFactory( role + "Selector" );
  +        return createFactory( role );
       }
   
       protected final MultiSourceTypeFactory lookupFactory( final String role )
  @@ -79,14 +79,10 @@
           ///If we haven't goa factory try to create a new one
           if( null == factory )
           {
  -            //Precondition that role.endsWith( "Factory" )
  -            final int length = role.length() - 8;
  -            final String workInterface = role.substring( 0, length );
  -
               try
               {
                   //TODO: Should we use ContextClassLoader here ??? Or perhaps try that on failure??
  -                final Class clazz = Class.forName( workInterface );
  +                final Class clazz = Class.forName( role );
                   factory = new MultiSourceTypeFactory( clazz );
               }
               catch( final Exception e )