You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gi...@apache.org on 2018/05/28 05:10:54 UTC
[14/14] ant git commit: Merge 1.9.x
Merge 1.9.x
Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/f6f16d98
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/f6f16d98
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/f6f16d98
Branch: refs/heads/master
Commit: f6f16d98d90382f91f7dbad763e1e88d24256f23
Parents: 8f30c47 291a214
Author: Gintas Grigelionis <gi...@apache.org>
Authored: Mon May 28 07:10:48 2018 +0200
Committer: Gintas Grigelionis <gi...@apache.org>
Committed: Mon May 28 07:10:48 2018 +0200
----------------------------------------------------------------------
.../org/apache/tools/ant/taskdefs/Copy.java | 7 +++--
.../org/apache/tools/ant/taskdefs/Javadoc.java | 28 +++++++-------------
.../org/apache/tools/ant/taskdefs/Untar.java | 5 ++--
.../ant/taskdefs/optional/depend/Depend.java | 5 ++--
.../optional/junit/XMLResultAggregator.java | 1 -
.../optional/net/FTPTaskMirrorImpl.java | 20 +++++---------
.../org/apache/tools/ant/types/Commandline.java | 4 +--
.../org/apache/tools/ant/types/FilterSet.java | 3 +--
8 files changed, 27 insertions(+), 46 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/taskdefs/Copy.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
----------------------------------------------------------------------
diff --cc src/main/org/apache/tools/ant/taskdefs/Javadoc.java
index 2352459,7a5c2ec..1ca9dad
--- a/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
+++ b/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
@@@ -1908,14 -1919,14 +1908,12 @@@ public class Javadoc extends Task
private void doDoclet(final Commandline toExecute) {
if (doclet != null) {
if (doclet.getName() == null) {
-- throw new BuildException("The doclet name must be specified.",
-- getLocation());
++ throw new BuildException("The doclet name must be specified.", getLocation());
}
toExecute.createArgument().setValue("-doclet");
toExecute.createArgument().setValue(doclet.getName());
if (doclet.getPath() != null) {
-- final Path docletPath
-- = doclet.getPath().concatSystemClasspath("ignore");
++ final Path docletPath = doclet.getPath().concatSystemClasspath("ignore");
if (docletPath.size() != 0) {
toExecute.createArgument().setValue("-docletpath");
toExecute.createArgument().setPath(docletPath);
@@@ -2120,20 -2149,18 +2117,15 @@@
ta.getDirectoryScanner(getProject());
for (String file : tagDefScanner.getIncludedFiles()) {
final File tagDefFile = new File(tagDir, file);
- try (final BufferedReader in =
- new BufferedReader(new FileReader(tagDefFile))) {
- String line;
- try {
- final BufferedReader in = new BufferedReader(
- new FileReader(tagDefFile));
- String line = null;
-- while ((line = in.readLine()) != null) {
- toExecute.createArgument()
- .setValue("-tag");
- toExecute.createArgument()
- .setValue(line);
- }
++ try (final BufferedReader in = new BufferedReader(
++ new FileReader(tagDefFile))) {
++ in.lines().forEach(line -> {
+ toExecute.createArgument().setValue("-tag");
+ toExecute.createArgument().setValue(line);
- }
- in.close();
++ });
} catch (final IOException ioe) {
- throw new BuildException(
- "Couldn't read tag file from "
- + tagDefFile.getAbsolutePath(),
- ioe);
- throw new BuildException("Couldn't read tag file from "
++ throw new BuildException("Couldn't read tag file from "
+ + tagDefFile.getAbsolutePath(), ioe);
}
}
}
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/taskdefs/Untar.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
----------------------------------------------------------------------
diff --cc src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
index f72da99,99a49c4..8b80cb8
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
@@@ -483,7 -526,8 +482,7 @@@ public class Depend extends MatchingTas
continue;
}
// need to delete the main class
- String topLevelClassName = affectedClass.substring(0, aci);
- String topLevelClassName
- = affectedClass.substring(0, affectedClass.indexOf("$"));
++ String topLevelClassName = affectedClass.substring(0, affectedClass.indexOf("$"));
log("Top level class = " + topLevelClassName,
Project.MSG_VERBOSE);
ClassFileInfo topLevelClassInfo
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/taskdefs/optional/junit/XMLResultAggregator.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java
----------------------------------------------------------------------
diff --cc src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java
index c378b21,85d0289..0d877aa
--- a/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/net/FTPTaskMirrorImpl.java
@@@ -724,30 -719,28 +722,26 @@@ public class FTPTaskMirrorImpl implemen
}
this.curpwd = parent.getAbsolutePath();
} catch (IOException ioe) {
- throw new BuildException(
- "could not change working dir to %s", parent.curpwd);
- throw new BuildException("could not change working dir to " + parent.curpwd);
++ throw new BuildException("could not change working dir to %s", parent.curpwd);
}
for (String currentPathElement : pathElements) {
try {
- boolean result = this.client.changeWorkingDirectory(currentPathElement);
- if (!result && !isCaseSensitive()
- && (remoteSystemCaseSensitive || !remoteSensitivityChecked)) {
- currentPathElement = findPathElementCaseUnsensitive(this.curpwd,
- currentPathElement);
- if (currentPathElement == null) {
- return;
+ if (!this.client.changeWorkingDirectory(currentPathElement)) {
+ if (!isCaseSensitive() && (remoteSystemCaseSensitive
- || !remoteSensitivityChecked)) {
- currentPathElement =
- findPathElementCaseUnsensitive(this.curpwd,
++ || !remoteSensitivityChecked)) {
++ currentPathElement = findPathElementCaseUnsensitive(this.curpwd,
+ currentPathElement);
+ if (currentPathElement == null) {
+ return;
+ }
}
- } else if (!result) {
return;
}
- this.curpwd =
- getCurpwdPlusFileSep() + currentPathElement;
- this.curpwd = getCurpwdPlusFileSep()
- + currentPathElement;
++ this.curpwd = getCurpwdPlusFileSep() + currentPathElement;
} catch (IOException ioe) {
- throw new BuildException(
- "could not change working dir to %s from %s",
- currentPathElement, this.curpwd);
- throw new BuildException("could not change working dir to "
- + currentPathElement + " from " + this.curpwd);
++ throw new BuildException("could not change working dir to %s from %s",
++ currentPathElement, this.curpwd);
}
-
}
String lastpathelement = pathElements.get(pathElements.size() - 1);
this.ftpFile = getFile(listFiles(this.curpwd), lastpathelement);
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/types/Commandline.java
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/ant/blob/f6f16d98/src/main/org/apache/tools/ant/types/FilterSet.java
----------------------------------------------------------------------