git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@270173 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -697,7 +697,7 @@ public class Project | |||||
| { | { | ||||
| log( "Trying to override old definition of task " + taskName, | log( "Trying to override old definition of task " + taskName, | ||||
| MSG_WARN ); | MSG_WARN ); | ||||
| invalidateCreatedTasks( taskName ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1311,29 +1311,4 @@ public class Project | |||||
| listener.messageLogged( event ); | listener.messageLogged( event ); | ||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Mark tasks as invalid which no longer are of the correct type for a given | |||||
| * taskname. | |||||
| * | |||||
| * @param type Description of Parameter | |||||
| */ | |||||
| private void invalidateCreatedTasks( String type ) | |||||
| { | |||||
| synchronized( createdTasks ) | |||||
| { | |||||
| Vector v = (Vector)createdTasks.get( type ); | |||||
| if( v != null ) | |||||
| { | |||||
| Enumeration enum = v.elements(); | |||||
| while( enum.hasMoreElements() ) | |||||
| { | |||||
| Task t = (Task)enum.nextElement(); | |||||
| t.markInvalid(); | |||||
| } | |||||
| v.removeAllElements(); | |||||
| createdTasks.remove( type ); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -1018,7 +1018,6 @@ public class ProjectHelper | |||||
| task.setTaskName( tag ); | task.setTaskName( tag ); | ||||
| } | } | ||||
| task.setLocation( new Location( buildFile.toString(), locator.getLineNumber(), locator.getColumnNumber() ) ); | |||||
| configureId( task, attrs ); | configureId( task, attrs ); | ||||
| // Top level tasks don't have associated targets | // Top level tasks don't have associated targets | ||||
| @@ -250,7 +250,6 @@ public class UnknownElement extends Task | |||||
| if( task != null ) | if( task != null ) | ||||
| { | { | ||||
| task.setLocation( getLocation() ); | |||||
| // UnknownElement always has an associated target | // UnknownElement always has an associated target | ||||
| task.setOwningTarget( target ); | task.setOwningTarget( target ); | ||||
| task.init(); | task.init(); | ||||
| @@ -305,7 +305,6 @@ public class Get extends Task | |||||
| Touch touch = (Touch)project.createTask( "touch" ); | Touch touch = (Touch)project.createTask( "touch" ); | ||||
| touch.setOwningTarget( target ); | touch.setOwningTarget( target ); | ||||
| touch.setTaskName( getTaskName() ); | touch.setTaskName( getTaskName() ); | ||||
| touch.setLocation( getLocation() ); | |||||
| touch.setFile( file ); | touch.setFile( file ); | ||||
| touch.setMillis( timemillis ); | touch.setMillis( timemillis ); | ||||
| touch.touch(); | touch.touch(); | ||||
| @@ -74,7 +74,7 @@ public class Tstamp extends Task | |||||
| while( i.hasMoreElements() ) | while( i.hasMoreElements() ) | ||||
| { | { | ||||
| CustomFormat cts = (CustomFormat)i.nextElement(); | CustomFormat cts = (CustomFormat)i.nextElement(); | ||||
| cts.execute( project, d, location ); | |||||
| cts.execute( project, d ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -207,7 +207,7 @@ public class Tstamp extends Task | |||||
| field = unit.getCalendarField(); | field = unit.getCalendarField(); | ||||
| } | } | ||||
| public void execute( Project project, Date date, Location location ) | |||||
| public void execute( Project project, Date date ) | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( propertyName == null ) | if( propertyName == null ) | ||||
| @@ -51,7 +51,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter | |||||
| protected Path extdirs; | protected Path extdirs; | ||||
| protected boolean includeAntRuntime; | protected boolean includeAntRuntime; | ||||
| protected boolean includeJavaRuntime; | protected boolean includeJavaRuntime; | ||||
| protected Location location; | |||||
| protected String memoryInitialSize; | protected String memoryInitialSize; | ||||
| protected String memoryMaximumSize; | protected String memoryMaximumSize; | ||||
| protected Project project; | protected Project project; | ||||
| @@ -80,7 +79,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter | |||||
| compileList = attributes.getFileList(); | compileList = attributes.getFileList(); | ||||
| compileClasspath = attributes.getClasspath(); | compileClasspath = attributes.getClasspath(); | ||||
| project = attributes.getProject(); | project = attributes.getProject(); | ||||
| location = attributes.getLocation(); | |||||
| includeAntRuntime = attributes.getIncludeantruntime(); | includeAntRuntime = attributes.getIncludeantruntime(); | ||||
| includeJavaRuntime = attributes.getIncludejavaruntime(); | includeJavaRuntime = attributes.getIncludejavaruntime(); | ||||
| memoryInitialSize = attributes.getMemoryInitialSize(); | memoryInitialSize = attributes.getMemoryInitialSize(); | ||||
| @@ -460,11 +460,6 @@ public class GenericDeploymentTool implements EJBDeploymentTool | |||||
| return baseName; | return baseName; | ||||
| } | } | ||||
| protected Location getLocation() | |||||
| { | |||||
| return getTask().getLocation(); | |||||
| } | |||||
| /** | /** | ||||
| * Returns the Public ID of the DTD specified in the EJB descriptor. Not | * Returns the Public ID of the DTD specified in the EJB descriptor. Not | ||||
| * every vendor-specific <code>DeploymentTool</code> will need to reference | * every vendor-specific <code>DeploymentTool</code> will need to reference | ||||
| @@ -697,7 +697,7 @@ public class Project | |||||
| { | { | ||||
| log( "Trying to override old definition of task " + taskName, | log( "Trying to override old definition of task " + taskName, | ||||
| MSG_WARN ); | MSG_WARN ); | ||||
| invalidateCreatedTasks( taskName ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -1311,29 +1311,4 @@ public class Project | |||||
| listener.messageLogged( event ); | listener.messageLogged( event ); | ||||
| } | } | ||||
| } | } | ||||
| /** | |||||
| * Mark tasks as invalid which no longer are of the correct type for a given | |||||
| * taskname. | |||||
| * | |||||
| * @param type Description of Parameter | |||||
| */ | |||||
| private void invalidateCreatedTasks( String type ) | |||||
| { | |||||
| synchronized( createdTasks ) | |||||
| { | |||||
| Vector v = (Vector)createdTasks.get( type ); | |||||
| if( v != null ) | |||||
| { | |||||
| Enumeration enum = v.elements(); | |||||
| while( enum.hasMoreElements() ) | |||||
| { | |||||
| Task t = (Task)enum.nextElement(); | |||||
| t.markInvalid(); | |||||
| } | |||||
| v.removeAllElements(); | |||||
| createdTasks.remove( type ); | |||||
| } | |||||
| } | |||||
| } | |||||
| } | } | ||||
| @@ -1018,7 +1018,6 @@ public class ProjectHelper | |||||
| task.setTaskName( tag ); | task.setTaskName( tag ); | ||||
| } | } | ||||
| task.setLocation( new Location( buildFile.toString(), locator.getLineNumber(), locator.getColumnNumber() ) ); | |||||
| configureId( task, attrs ); | configureId( task, attrs ); | ||||
| // Top level tasks don't have associated targets | // Top level tasks don't have associated targets | ||||
| @@ -250,7 +250,6 @@ public class UnknownElement extends Task | |||||
| if( task != null ) | if( task != null ) | ||||
| { | { | ||||
| task.setLocation( getLocation() ); | |||||
| // UnknownElement always has an associated target | // UnknownElement always has an associated target | ||||
| task.setOwningTarget( target ); | task.setOwningTarget( target ); | ||||
| task.init(); | task.init(); | ||||
| @@ -305,7 +305,6 @@ public class Get extends Task | |||||
| Touch touch = (Touch)project.createTask( "touch" ); | Touch touch = (Touch)project.createTask( "touch" ); | ||||
| touch.setOwningTarget( target ); | touch.setOwningTarget( target ); | ||||
| touch.setTaskName( getTaskName() ); | touch.setTaskName( getTaskName() ); | ||||
| touch.setLocation( getLocation() ); | |||||
| touch.setFile( file ); | touch.setFile( file ); | ||||
| touch.setMillis( timemillis ); | touch.setMillis( timemillis ); | ||||
| touch.touch(); | touch.touch(); | ||||
| @@ -74,7 +74,7 @@ public class Tstamp extends Task | |||||
| while( i.hasMoreElements() ) | while( i.hasMoreElements() ) | ||||
| { | { | ||||
| CustomFormat cts = (CustomFormat)i.nextElement(); | CustomFormat cts = (CustomFormat)i.nextElement(); | ||||
| cts.execute( project, d, location ); | |||||
| cts.execute( project, d ); | |||||
| } | } | ||||
| } | } | ||||
| @@ -207,7 +207,7 @@ public class Tstamp extends Task | |||||
| field = unit.getCalendarField(); | field = unit.getCalendarField(); | ||||
| } | } | ||||
| public void execute( Project project, Date date, Location location ) | |||||
| public void execute( Project project, Date date ) | |||||
| throws TaskException | throws TaskException | ||||
| { | { | ||||
| if( propertyName == null ) | if( propertyName == null ) | ||||
| @@ -51,7 +51,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter | |||||
| protected Path extdirs; | protected Path extdirs; | ||||
| protected boolean includeAntRuntime; | protected boolean includeAntRuntime; | ||||
| protected boolean includeJavaRuntime; | protected boolean includeJavaRuntime; | ||||
| protected Location location; | |||||
| protected String memoryInitialSize; | protected String memoryInitialSize; | ||||
| protected String memoryMaximumSize; | protected String memoryMaximumSize; | ||||
| protected Project project; | protected Project project; | ||||
| @@ -80,7 +79,6 @@ public abstract class DefaultCompilerAdapter implements CompilerAdapter | |||||
| compileList = attributes.getFileList(); | compileList = attributes.getFileList(); | ||||
| compileClasspath = attributes.getClasspath(); | compileClasspath = attributes.getClasspath(); | ||||
| project = attributes.getProject(); | project = attributes.getProject(); | ||||
| location = attributes.getLocation(); | |||||
| includeAntRuntime = attributes.getIncludeantruntime(); | includeAntRuntime = attributes.getIncludeantruntime(); | ||||
| includeJavaRuntime = attributes.getIncludejavaruntime(); | includeJavaRuntime = attributes.getIncludejavaruntime(); | ||||
| memoryInitialSize = attributes.getMemoryInitialSize(); | memoryInitialSize = attributes.getMemoryInitialSize(); | ||||
| @@ -460,11 +460,6 @@ public class GenericDeploymentTool implements EJBDeploymentTool | |||||
| return baseName; | return baseName; | ||||
| } | } | ||||
| protected Location getLocation() | |||||
| { | |||||
| return getTask().getLocation(); | |||||
| } | |||||
| /** | /** | ||||
| * Returns the Public ID of the DTD specified in the EJB descriptor. Not | * Returns the Public ID of the DTD specified in the EJB descriptor. Not | ||||
| * every vendor-specific <code>DeploymentTool</code> will need to reference | * every vendor-specific <code>DeploymentTool</code> will need to reference | ||||