diff options
Diffstat (limited to 'src/main/org/apache/tools/ant/taskdefs/optional')
40 files changed, 129 insertions, 129 deletions
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java b/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java index 706f6bf10..2812635e7 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ANTLR.java @@ -273,7 +273,7 @@ public class ANTLR extends Task { log(commandline.describeCommand(), Project.MSG_VERBOSE); int err = run(commandline.getCommandline()); if (err == 1) { - throw new BuildException("ANTLR returned: " + err, location); + throw new BuildException("ANTLR returned: " + err, getLocation()); } } else { log("Skipped grammar file. Generated file is newer.", Project.MSG_VERBOSE); @@ -364,7 +364,7 @@ public class ANTLR extends Task { try { return exe.execute(); } catch (IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java index f29d9ea7b..db125e6b9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/EchoProperties.java @@ -248,7 +248,7 @@ public class EchoProperties extends Task { if (inFile.exists() && inFile.isDirectory()) { String message = "srcfile is a directory!"; if (failonerror) { - throw new BuildException(message, location); + throw new BuildException(message, getLocation()); } else { log(message, Project.MSG_ERR); } @@ -258,7 +258,7 @@ public class EchoProperties extends Task { if (inFile.exists() && !inFile.canRead()) { String message = "Can not read from the specified srcfile!"; if (failonerror) { - throw new BuildException( message, location ); + throw new BuildException( message, getLocation() ); } else { log( message, Project.MSG_ERR ); } @@ -275,7 +275,7 @@ public class EchoProperties extends Task { String message = "Could not find file " + inFile.getAbsolutePath(); if (failonerror) { - throw new BuildException(message, fnfe, location); + throw new BuildException(message, fnfe, getLocation()); } else { log( message, Project.MSG_WARN ); } @@ -284,7 +284,7 @@ public class EchoProperties extends Task { String message = "Could not read file " + inFile.getAbsolutePath(); if (failonerror) { - throw new BuildException(message, ioe, location); + throw new BuildException(message, ioe, getLocation()); } else { log( message, Project.MSG_WARN ); } @@ -308,7 +308,7 @@ public class EchoProperties extends Task { if (destfile.exists() && destfile.isDirectory()) { String message = "destfile is a directory!"; if (failonerror) { - throw new BuildException(message, location); + throw new BuildException(message, getLocation()); } else { log(message, Project.MSG_ERR); } @@ -319,7 +319,7 @@ public class EchoProperties extends Task { String message = "Can not write to the specified destfile!"; if (failonerror) { - throw new BuildException(message, location); + throw new BuildException(message, getLocation()); } else { log(message, Project.MSG_ERR); } @@ -330,7 +330,7 @@ public class EchoProperties extends Task { } } catch (IOException ioe) { if (failonerror) { - throw new BuildException(ioe, location); + throw new BuildException(ioe, getLocation()); } else { log(ioe.getMessage(), Project.MSG_INFO); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java b/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java index 4eb572650..327d4e507 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/IContract.java @@ -654,22 +654,22 @@ public class IContract extends MatchingTask { /** Checks that the required attributes are set. */ private void preconditions() throws BuildException { if (srcDir == null) { - throw new BuildException("srcdir attribute must be set!", location); + throw new BuildException("srcdir attribute must be set!", getLocation()); } if (!srcDir.exists()) { - throw new BuildException("srcdir \"" + srcDir.getPath() + "\" does not exist!", location); + throw new BuildException("srcdir \"" + srcDir.getPath() + "\" does not exist!", getLocation()); } if (instrumentDir == null) { - throw new BuildException("instrumentdir attribute must be set!", location); + throw new BuildException("instrumentdir attribute must be set!", getLocation()); } if (repositoryDir == null) { - throw new BuildException("repositorydir attribute must be set!", location); + throw new BuildException("repositorydir attribute must be set!", getLocation()); } if (updateIcontrol == true && classDir == null) { - throw new BuildException("classdir attribute must be specified when updateicontrol=true!", location); + throw new BuildException("classdir attribute must be specified when updateicontrol=true!", getLocation()); } if (updateIcontrol == true && controlFile == null) { - throw new BuildException("controlfile attribute must be specified when updateicontrol=true!", location); + throw new BuildException("controlfile attribute must be specified when updateicontrol=true!", getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java index 871b798a5..ac23d05ac 100755 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Javah.java @@ -283,19 +283,19 @@ public class Javah extends Task { // first off, make sure that we've got a srcdir if ((cls == null) && (classes.size() == 0)) { - throw new BuildException("class attribute must be set!", location); + throw new BuildException("class attribute must be set!", getLocation()); } if ((cls != null) && (classes.size() > 0)) { - throw new BuildException("set class attribute or class element, not both.", location); + throw new BuildException("set class attribute or class element, not both.", getLocation()); } if (destDir != null) { if (!destDir.isDirectory()) { - throw new BuildException("destination directory \"" + destDir + "\" does not exist or is not a directory", location); + throw new BuildException("destination directory \"" + destDir + "\" does not exist or is not a directory", getLocation()); } if (outputFile != null) { - throw new BuildException("destdir and outputFile are mutually exclusive", location); + throw new BuildException("destdir and outputFile are mutually exclusive", getLocation()); } } @@ -350,7 +350,7 @@ public class Javah extends Task { if (ex instanceof BuildException) { throw (BuildException) ex; } else { - throw new BuildException("Error starting javah: " + ex, ex, location); + throw new BuildException("Error starting javah: " + ex, ex, getLocation()); } } } @@ -396,7 +396,7 @@ public class Javah extends Task { if (stubs) { if (!old) { - throw new BuildException("stubs only available in old mode.", location); + throw new BuildException("stubs only available in old mode.", getLocation()); } cmd.createArgument().setValue("-stubs"); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java b/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java index 547b2acf7..26aaa05db 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Native2Ascii.java @@ -140,7 +140,7 @@ public class Native2Ascii extends MatchingTask { public Mapper createMapper() throws BuildException { if (mapper != null) { throw new BuildException("Cannot define more than one mapper", - location); + getLocation()); } mapper = new Mapper(getProject()); return mapper; diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java b/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java index 798e578df..bdb014e1e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/PropertyFile.java @@ -235,7 +235,7 @@ public class PropertyFile extends Task { private void checkParameters() throws BuildException { if (!checkParam(propertyfile)) { - throw new BuildException("file token must not be null.", location); + throw new BuildException("file token must not be null.", getLocation()); } } @@ -270,12 +270,12 @@ public class PropertyFile extends Task { properties.save(bos, comment); } catch (InvocationTargetException ite) { Throwable t = ite.getTargetException(); - throw new BuildException(t, location); + throw new BuildException(t, getLocation()); } catch (IllegalAccessException iae) { // impossible - throw new BuildException(iae, location); + throw new BuildException(iae, getLocation()); } catch (IOException ioe) { - throw new BuildException(ioe, location); + throw new BuildException(ioe, getLocation()); } finally { if (bos != null) { try { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java b/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java index 71dafdc6b..593971701 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/RenameExtensions.java @@ -152,7 +152,7 @@ public class RenameExtensions extends MatchingTask { Project.MSG_INFO); Move move = (Move) getProject().createTask("move"); - move.setOwningTarget(target); + move.setOwningTarget(getOwningTarget()); move.setTaskName(getTaskName()); move.setLocation(getLocation()); move.setTodir(srcDir); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java index 10ccec2b0..71871eb69 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/Rpm.java @@ -150,7 +150,7 @@ public class Rpm extends Task { try { outputstream = new PrintStream(new BufferedOutputStream(new FileOutputStream(output))); } catch (IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } else { outputstream = new LogOutputStream(this, Project.MSG_INFO); @@ -159,7 +159,7 @@ public class Rpm extends Task { try { errorstream = new PrintStream(new BufferedOutputStream(new FileOutputStream(error))); } catch (IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } else { errorstream = new LogOutputStream(this, Project.MSG_WARN); @@ -180,7 +180,7 @@ public class Rpm extends Task { exe.execute(); log("Building the RPM based on the " + specFile + " file"); } catch (IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } finally { if (output != null) { try { @@ -218,7 +218,7 @@ public class Rpm extends Task { */ public void setSpecFile(String sf) { if ((sf == null) || (sf.trim().equals(""))) { - throw new BuildException("You must specify a spec file", location); + throw new BuildException("You must specify a spec file", getLocation()); } this.specFile = sf; } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java index 5db036377..302f0397c 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCheck.java @@ -149,7 +149,7 @@ public class CCMCheck extends Continuus { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java index 7e75a2bb9..54d5d2164 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMCreateTask.java @@ -110,7 +110,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { result = run(commandLine, this); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } //create task ok, set this task as the default one @@ -124,7 +124,7 @@ public class CCMCreateTask extends Continuus implements ExecuteStreamHandler { result = run(commandLine2); if (result != 0) { String msg = "Failed executing: " + commandLine2.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java index e23c403b2..3c2ed151b 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/CCMReconfigure.java @@ -98,7 +98,7 @@ public class CCMReconfigure extends Continuus { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java index fede3806b..16d6f0a09 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ccm/Continuus.java @@ -130,7 +130,7 @@ public abstract class Continuus extends Task { exe.setCommandline(cmd.getCommandline()); return exe.execute(); } catch (java.io.IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java index ea11c4fc7..9a17eaef8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckin.java @@ -146,7 +146,7 @@ public class CCCheckin extends ClearCase { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java index 4f3602f87..956f3f42a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCCheckout.java @@ -158,7 +158,7 @@ public class CCCheckout extends ClearCase { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java index e9f4f1f0d..304cfa83f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUnCheckout.java @@ -116,7 +116,7 @@ public class CCUnCheckout extends ClearCase { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java index 04722c807..60962ebc9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/CCUpdate.java @@ -151,7 +151,7 @@ public class CCUpdate extends ClearCase { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java index 691a85b50..b517edb54 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/clearcase/ClearCase.java @@ -134,7 +134,7 @@ public abstract class ClearCase extends Task { exe.setCommandline(cmd.getCommandline()); return exe.execute(); } catch (java.io.IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java index 72029553d..b4c2e5ba8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java @@ -638,14 +638,14 @@ public class Depend extends MatchingTask { try { long start = System.currentTimeMillis(); if (srcPath == null) { - throw new BuildException("srcdir attribute must be set", - location); + throw new BuildException("srcdir attribute must be set", + getLocation()); } srcPathList = srcPath.list(); if (srcPathList.length == 0) { - throw new BuildException("srcdir attribute must be non-empty", - location); + throw new BuildException("srcdir attribute must be non-empty", + getLocation()); } if (destPath == null) { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java index a729e55a4..a8a18355d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/ejb/IPlanetEjbcTask.java @@ -239,34 +239,34 @@ public class IPlanetEjbcTask extends Task { if (ejbdescriptor == null) { String msg = "The standard EJB descriptor must be specified using " + "the \"ejbdescriptor\" attribute."; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if ((!ejbdescriptor.exists()) || (!ejbdescriptor.isFile())) { String msg = "The standard EJB descriptor (" + ejbdescriptor + ") was not found or isn't a file."; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if (iasdescriptor == null) { String msg = "The iAS-speific XML descriptor must be specified using" + " the \"iasdescriptor\" attribute."; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if ((!iasdescriptor.exists()) || (!iasdescriptor.isFile())) { String msg = "The iAS-specific XML descriptor (" + iasdescriptor + ") was not found or isn't a file."; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if (dest == null) { String msg = "The destination directory must be specified using " + "the \"dest\" attribute."; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if ((!dest.exists()) || (!dest.isDirectory())) { String msg = "The destination directory (" + dest + ") was not " + "found or isn't a directory."; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if ((iashome != null) && (!iashome.isDirectory())) { @@ -291,10 +291,10 @@ public class IPlanetEjbcTask extends Task { saxParser = saxParserFactory.newSAXParser(); } catch (SAXException e) { String msg = "Unable to create a SAXParser: " + e.getMessage(); - throw new BuildException(msg, e, location); + throw new BuildException(msg, e, getLocation()); } catch (ParserConfigurationException e) { String msg = "Unable to create a SAXParser: " + e.getMessage(); - throw new BuildException(msg, e, location); + throw new BuildException(msg, e, getLocation()); } return saxParser; @@ -325,15 +325,15 @@ public class IPlanetEjbcTask extends Task { } catch (IOException e) { String msg = "An IOException occurred while trying to read the XML " + "descriptor file: " + e.getMessage(); - throw new BuildException(msg, e, location); + throw new BuildException(msg, e, getLocation()); } catch (SAXException e) { String msg = "A SAXException occurred while trying to read the XML " + "descriptor file: " + e.getMessage(); - throw new BuildException(msg, e, location); + throw new BuildException(msg, e, getLocation()); } catch (IPlanetEjbc.EjbcException e) { String msg = "An exception occurred while trying to run the ejbc " + "utility: " + e.getMessage(); - throw new BuildException(msg, e, location); + throw new BuildException(msg, e, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java index 82bf63532..5f09a4293 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/i18n/Translate.java @@ -248,29 +248,29 @@ public class Translate extends MatchingTask { public void execute() throws BuildException { if (bundle == null) { throw new BuildException("The bundle attribute must be set.", - location); + getLocation()); } if (startToken == null) { throw new BuildException("The starttoken attribute must be set.", - location); + getLocation()); } if (startToken.length() != 1) { throw new BuildException( "The starttoken attribute must be a single character.", - location); + getLocation()); } if (endToken == null) { throw new BuildException("The endtoken attribute must be set.", - location); + getLocation()); } if (endToken.length() != 1) { throw new BuildException( "The endtoken attribute must be a single character.", - location); + getLocation()); } if (bundleLanguage == null) { @@ -289,7 +289,7 @@ public class Translate extends MatchingTask { if (toDir == null) { throw new BuildException("The todir attribute must be set.", - location); + getLocation()); } if (!toDir.exists()) { @@ -405,7 +405,7 @@ public class Translate extends MatchingTask { //have been scanned for and still not able to //find a single resrouce file, throw exception if (!loaded && checkLoaded) { - throw new BuildException(ioe.getMessage(), location); + throw new BuildException(ioe.getMessage(), getLocation()); } } } @@ -463,7 +463,7 @@ public class Translate extends MatchingTask { in.close(); } } catch (IOException ioe) { - throw new BuildException(ioe.getMessage(), location); + throw new BuildException(ioe.getMessage(), getLocation()); } } @@ -579,7 +579,7 @@ outer: while (true) { Project.MSG_VERBOSE); } } catch (IOException ioe) { - throw new BuildException(ioe.getMessage(), location); + throw new BuildException(ioe.getMessage(), getLocation()); } } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java index d7f1e57e6..051a29ad6 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jdepend/JDependTask.java @@ -303,7 +303,7 @@ public class JDependTask extends Task { if (errorOccurred) { if (getHaltonerror()) { throw new BuildException("JDepend failed", - location); + getLocation()); } else { log("JDepend FAILED", Project.MSG_ERR); } @@ -426,7 +426,7 @@ public class JDependTask extends Task { try { return execute.execute(); } catch (IOException e) { - throw new BuildException("Process fork failed.", e, location); + throw new BuildException("Process fork failed.", e, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java index f698b6cf6..e6fb10bf9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jlink/JlinkTask.java @@ -177,7 +177,7 @@ public class JlinkTask extends MatchingTask { try { linker.link(); } catch (Exception ex) { - throw new BuildException(ex, location); + throw new BuildException(ex, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java index f63caa9ca..37389641e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/JspC.java @@ -402,19 +402,19 @@ public class JspC extends MatchingTask { // first off, make sure that we've got a srcdir if (src == null) { throw new BuildException("srcdir attribute must be set!", - location); + getLocation()); } String [] list = src.list(); if (list.length == 0) { throw new BuildException("srcdir attribute must be set!", - location); + getLocation()); } if (destDir != null && !destDir.isDirectory()) { throw new BuildException("destination directory \"" + destDir + "\" does not exist or is not a directory", - location); + getLocation()); } File dest = getActualDestDir(); @@ -441,7 +441,7 @@ public class JspC extends MatchingTask { File srcDir = (File) getProject().resolveFile(list[i]); if (!srcDir.exists()) { throw new BuildException("srcdir \"" + srcDir.getPath() + - "\" does not exist!", location); + "\" does not exist!", getLocation()); } DirectoryScanner ds = this.getDirectoryScanner(srcDir); String[] files = ds.getIncludedFiles(); @@ -497,7 +497,7 @@ public class JspC extends MatchingTask { // finally, lets execute the compiler!! if (!compiler.execute()) { if (failOnError) { - throw new BuildException(FAIL_MSG, location); + throw new BuildException(FAIL_MSG, getLocation()); } else { log(FAIL_MSG, Project.MSG_ERR); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java index b3cdfc460..a42be7d91 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/jsp/WLJspc.java @@ -139,7 +139,7 @@ public class WLJspc extends MatchingTask { } if (destinationPackage == null) { - throw new BuildException("package attribute must be present.", location); + throw new BuildException("package attribute must be present.", getLocation()); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java index e5f8bf64c..b10ac816f 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java @@ -566,7 +566,7 @@ public class JUnitTask extends Task { if ((errorOccurredHere && test.getHaltonerror()) || (failureOccurredHere && test.getHaltonfailure())) { throw new BuildException("Test " + test.getName() + " failed" - + (wasKilled ? " (timeout)" : ""), location); + + (wasKilled ? " (timeout)" : ""), getLocation()); } else { log("TEST " + test.getName() + " FAILED" + (wasKilled ? " (timeout)" : ""), Project.MSG_ERR); @@ -651,7 +651,7 @@ public class JUnitTask extends Task { } catch (java.io.IOException e) { propsFile.delete(); throw new BuildException("Error creating temporary properties " - + "file.", e, location); + + "file.", e, getLocation()); } Execute execute = new Execute(new LogStreamHandler(this, @@ -679,7 +679,7 @@ public class JUnitTask extends Task { try { retVal = execute.execute(); } catch (IOException e) { - throw new BuildException("Process fork failed.", e, location); + throw new BuildException("Process fork failed.", e, getLocation()); } finally { if (!propsFile.delete()) { throw new BuildException("Could not delete temporary " diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java index 299c4ca55..a2a008e6e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/pvcs/Pvcs.java @@ -144,7 +144,7 @@ public class Pvcs extends org.apache.tools.ant.Task { } catch (java.io.IOException e) { String msg = "Failed executing: " + cmd.toString() + ". Exception: " + e.getMessage(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -231,7 +231,7 @@ public class Pvcs extends org.apache.tools.ant.Task { if (result != 0 && !ignorerc) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if (!tmp.exists()) { @@ -278,21 +278,21 @@ public class Pvcs extends org.apache.tools.ant.Task { if (result != 0 && !ignorerc) { String msg = "Failed executing: " + commandLine.toString() + ". Return code was " + result; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } catch (FileNotFoundException e) { String msg = "Failed executing: " + commandLine.toString() + ". Exception: " + e.getMessage(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } catch (IOException e) { String msg = "Failed executing: " + commandLine.toString() + ". Exception: " + e.getMessage(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } catch (ParseException e) { String msg = "Failed executing: " + commandLine.toString() + ". Exception: " + e.getMessage(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } finally { if (tmp != null) { tmp.delete(); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java index 04ba520e2..e61d80683 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOS.java @@ -464,7 +464,7 @@ public abstract class SOS extends Task { if (!done) { String msg = "Directory " + localPath + " creation was not " + "successful for an unknown reason"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } getProject().log("Created dir: " + dir.getAbsolutePath()); } @@ -491,7 +491,7 @@ public abstract class SOS extends Task { exe.setCommandline(cmd.getCommandline()); return exe.execute(); } catch (java.io.IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java index 349daff98..f76791a61 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckin.java @@ -161,7 +161,7 @@ public class SOSCheckin extends SOS { if (result == 255) { // This is the exit status String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -200,13 +200,13 @@ public class SOSCheckin extends SOS { } // SOS server address is required if (getSosServerPath() == null) { - throw new BuildException("sosserverpath attribute must be set!", location); + throw new BuildException("sosserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_SOS_SERVER); commandLine.createArgument().setValue(getSosServerPath()); // Login info is required if (getUsername() == null) { - throw new BuildException("username attribute must be set!", location); + throw new BuildException("username attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_USERNAME); commandLine.createArgument().setValue(getUsername()); @@ -216,13 +216,13 @@ public class SOSCheckin extends SOS { commandLine.createArgument().setValue(getPassword()); // VSS Info is required if (getVssServerPath() == null) { - throw new BuildException("vssserverpath attribute must be set!", location); + throw new BuildException("vssserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_VSS_SERVER); commandLine.createArgument().setValue(getVssServerPath()); // VSS project is required if (getProjectPath() == null) { - throw new BuildException("projectpath attribute must be set!", location); + throw new BuildException("projectpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_PROJECT); commandLine.createArgument().setValue(getProjectPath()); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java index 3ea44bc18..16f10c85a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSCheckout.java @@ -157,7 +157,7 @@ public class SOSCheckout extends SOS { if (result == 255) { // This is the exit status String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -195,13 +195,13 @@ public class SOSCheckout extends SOS { } // SOS server address is required if (getSosServerPath() == null) { - throw new BuildException("sosserverpath attribute must be set!", location); + throw new BuildException("sosserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_SOS_SERVER); commandLine.createArgument().setValue(getSosServerPath()); // Login info is required if (getUsername() == null) { - throw new BuildException("username attribute must be set!", location); + throw new BuildException("username attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_USERNAME); commandLine.createArgument().setValue(getUsername()); @@ -211,13 +211,13 @@ public class SOSCheckout extends SOS { commandLine.createArgument().setValue(getPassword()); // VSS Info is required if (getVssServerPath() == null) { - throw new BuildException("vssserverpath attribute must be set!", location); + throw new BuildException("vssserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_VSS_SERVER); commandLine.createArgument().setValue(getVssServerPath()); // VSS project is required if (getProjectPath() == null) { - throw new BuildException("projectpath attribute must be set!", location); + throw new BuildException("projectpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_PROJECT); commandLine.createArgument().setValue(getProjectPath()); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java index 6aa1462fa..5ccd25ea6 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSGet.java @@ -168,7 +168,7 @@ public class SOSGet extends SOS { if (result == 255) { // This is the exit status String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -217,13 +217,13 @@ public class SOSGet extends SOS { } // SOS server address is required if (getSosServerPath() == null) { - throw new BuildException("sosserverpath attribute must be set!", location); + throw new BuildException("sosserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_SOS_SERVER); commandLine.createArgument().setValue(getSosServerPath()); // Login info is required if (getUsername() == null) { - throw new BuildException("username attribute must be set!", location); + throw new BuildException("username attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_USERNAME); commandLine.createArgument().setValue(getUsername()); @@ -233,13 +233,13 @@ public class SOSGet extends SOS { commandLine.createArgument().setValue(getPassword()); // VSS Info is required if (getVssServerPath() == null) { - throw new BuildException("vssserverpath attribute must be set!", location); + throw new BuildException("vssserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_VSS_SERVER); commandLine.createArgument().setValue(getVssServerPath()); // SS project path is required if (getProjectPath() == null) { - throw new BuildException("projectpath attribute must be set!", location); + throw new BuildException("projectpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_PROJECT); commandLine.createArgument().setValue(getProjectPath()); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java index 5a4066352..f46dcd02a 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/sos/SOSLabel.java @@ -135,7 +135,7 @@ public class SOSLabel extends SOS { if (result == 255) { // This is the exit status String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -156,13 +156,13 @@ public class SOSLabel extends SOS { commandLine.createArgument().setValue(SOSCmd.COMMAND_LABEL); // SOS server address is required if (getSosServerPath() == null) { - throw new BuildException("sosserverpath attribute must be set!", location); + throw new BuildException("sosserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_SOS_SERVER); commandLine.createArgument().setValue(getSosServerPath()); // Login info is required if (getUsername() == null) { - throw new BuildException("username attribute must be set!", location); + throw new BuildException("username attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_USERNAME); commandLine.createArgument().setValue(getUsername()); @@ -172,19 +172,19 @@ public class SOSLabel extends SOS { commandLine.createArgument().setValue(getPassword()); // VSS Info is required if (getVssServerPath() == null) { - throw new BuildException("vssserverpath attribute must be set!", location); + throw new BuildException("vssserverpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_VSS_SERVER); commandLine.createArgument().setValue(getVssServerPath()); // SS project path is required if (getProjectPath() == null) { - throw new BuildException("projectpath attribute must be set!", location); + throw new BuildException("projectpath attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_PROJECT); commandLine.createArgument().setValue(getProjectPath()); // a label is required if (getLabel() == null) { - throw new BuildException("label attribute must be set!", location); + throw new BuildException("label attribute must be set!", getLocation()); } commandLine.createArgument().setValue(SOSCmd.FLAG_LABEL); commandLine.createArgument().setValue(getLabel()); diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java index 3cd677218..02e4ac462 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSS.java @@ -192,7 +192,7 @@ public abstract class MSVSS extends Task { exe.setCommandline(cmd.getCommandline()); return exe.execute(); } catch (java.io.IOException e) { - throw new BuildException(e, location); + throw new BuildException(e, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java index 4fa00e582..4b588a73d 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSADD.java @@ -86,7 +86,7 @@ public class MSVSSADD extends MSVSS { // first off, make sure that we've got a command and a localPath ... if (getLocalPath() == null) { String msg = "localPath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -113,7 +113,7 @@ public class MSVSSADD extends MSVSS { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java index 435bcbfc0..c426f0911 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKIN.java @@ -88,7 +88,7 @@ public class MSVSSCHECKIN extends MSVSS { // first off, make sure that we've got a command and a vssdir ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -117,7 +117,7 @@ public class MSVSSCHECKIN extends MSVSS { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -145,7 +145,7 @@ public class MSVSSCHECKIN extends MSVSS { String msg = "Directory " + m_LocalPath + " creation was not " + "succesful for an unknown reason"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } getProject().log("Created dir: " + dir.getAbsolutePath()); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java index 07715c3d8..f421f73eb 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCHECKOUT.java @@ -90,7 +90,7 @@ public class MSVSSCHECKOUT extends MSVSS { // first off, make sure that we've got a command and a vssdir ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -117,7 +117,7 @@ public class MSVSSCHECKOUT extends MSVSS { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -144,7 +144,7 @@ public class MSVSSCHECKOUT extends MSVSS { if (!done) { String msg = "Directory " + m_LocalPath + " creation was not " + "succesful for an unknown reason"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } getProject().log("Created dir: " + dir.getAbsolutePath()); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java index 48e059fa3..b0546e8eb 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCP.java @@ -83,7 +83,7 @@ public class MSVSSCP extends MSVSS { // first off, make sure that we've got a command and a vssdir ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -104,7 +104,7 @@ public class MSVSSCP extends MSVSS { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java index 23567b39a..b8e1c6434 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSCREATE.java @@ -137,7 +137,7 @@ public class MSVSSCREATE extends MSVSS { // first off, make sure that we've got a command and a vssdir... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -166,7 +166,7 @@ public class MSVSSCREATE extends MSVSS { result = run(commandLine); if (result != 0 && m_FailOnError) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java index 48201dc5c..5692f2148 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSGET.java @@ -153,7 +153,7 @@ public class MSVSSGET extends MSVSS { // first off, make sure that we've got a command and a vssdir ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -184,7 +184,7 @@ public class MSVSSGET extends MSVSS { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -211,7 +211,7 @@ public class MSVSSGET extends MSVSS { if (!done) { String msg = "Directory " + m_LocalPath + " creation was not " + "successful for an unknown reason"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } getProject().log("Created dir: " + dir.getAbsolutePath()); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java index 365a92906..0eb4407c0 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSHISTORY.java @@ -107,7 +107,7 @@ public class MSVSSHISTORY extends MSVSS { // first off, make sure that we've got a command and a vssdir and a label ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -150,7 +150,7 @@ public class MSVSSHISTORY extends MSVSS { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } @@ -252,7 +252,7 @@ public class MSVSSHISTORY extends MSVSS { startDate = calcDate(m_ToDate, m_NumDays); } catch (ParseException ex) { String msg = "Error parsing date: " + m_ToDate; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } cmd.createArgument().setValue(FLAG_VERSION_DATE + m_ToDate + VALUE_FROMDATE + startDate); } else if (m_FromDate != null && m_NumDays != Integer.MIN_VALUE) { @@ -261,7 +261,7 @@ public class MSVSSHISTORY extends MSVSS { endDate = calcDate(m_FromDate, m_NumDays); } catch (ParseException ex) { String msg = "Error parsing date: " + m_FromDate; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } cmd.createArgument().setValue(FLAG_VERSION_DATE + endDate + VALUE_FROMDATE + m_FromDate); } else { diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java index a0fcc48fa..2f2a5b616 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/vss/MSVSSLABEL.java @@ -133,11 +133,11 @@ public class MSVSSLABEL extends MSVSS { // first off, make sure that we've got a command and a vssdir and a label ... if (getVsspath() == null) { String msg = "vsspath attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } if (getLabel() == null) { String msg = "label attribute must be set!"; - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } // now look for illegal combinations of things ... @@ -171,7 +171,7 @@ public class MSVSSLABEL extends MSVSS { result = run(commandLine); if (result != 0) { String msg = "Failed executing: " + commandLine.toString(); - throw new BuildException(msg, location); + throw new BuildException(msg, getLocation()); } } |