Browse Source

Update with the changes in Project.

This makes ComponentHelper the almost exact duplication of the task creation
code in Project.


PR:
Obtained from:
Submitted by:
Reviewed by:


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274545 13f79535-47bb-0310-9956-ffa450edef68
master
Costin Manolache 22 years ago
parent
commit
d60aff9e78
1 changed files with 12 additions and 4 deletions
  1. +12
    -4
      src/main/org/apache/tools/ant/ComponentHelper.java

+ 12
- 4
src/main/org/apache/tools/ant/ComponentHelper.java View File

@@ -423,6 +423,7 @@ public class ComponentHelper {
}
task = taskA;
}
task.setProject( project );
task.setTaskType(taskType);

// set default value, can be changed by the user
@@ -631,7 +632,9 @@ public class ComponentHelper {
project.log("Loading with the core loader " + value,
Project.MSG_DEBUG);
taskClass=project.getCoreLoader().loadClass(value);
if( taskClass != null ) return taskClass;
if( taskClass != null ) {
return taskClass;
}
} catch( Exception ex ) {
}
}
@@ -650,12 +653,17 @@ public class ComponentHelper {
// Hashtable implementation
public Object get( Object key ) {
Object orig=super.get( key );
if( orig!= null ) return orig;
if( ! (key instanceof String) ) return null;
if( orig!= null ) {
return orig;
}
if( ! (key instanceof String) ) {
return null;
}
project.log("Get task " + key, Project.MSG_DEBUG );
Object taskClass=getTask( (String) key);
if( taskClass != null)
if( taskClass != null) {
super.put( key, taskClass );
}
return taskClass;
}



Loading…
Cancel
Save