Browse Source

Removed decoration of role with "selector" as it was legacy to old implementation.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269122 13f79535-47bb-0310-9956-ffa450edef68
master
Peter Donald 24 years ago
parent
commit
50da0f9f1a
1 changed files with 3 additions and 7 deletions
  1. +3
    -7
      proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java

+ 3
- 7
proposal/myrmidon/src/java/org/apache/myrmidon/components/type/DefaultTypeManager.java View File

@@ -38,14 +38,14 @@ public class DefaultTypeManager
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 @@ public class DefaultTypeManager
///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 )


Loading…
Cancel
Save