Jenkins build became unstable: Ant-Build-Matrix-master-Linux » xenial,JDK 1.9 (latest) #1457

2018-11-18 Thread Apache Jenkins Server
See 




ant git commit: Avoid leaks in AntAnalyzer

2018-11-18 Thread gintas
Repository: ant
Updated Branches:
  refs/heads/master 9321ea62b -> aff7eefe1


Avoid leaks in AntAnalyzer

Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/aff7eefe
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/aff7eefe
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/aff7eefe

Branch: refs/heads/master
Commit: aff7eefe14a3239e83de9a427cabe5a0b4cc
Parents: 9321ea6
Author: Gintas Grigelionis 
Authored: Sun Nov 18 20:57:49 2018 +0100
Committer: Gintas Grigelionis 
Committed: Sun Nov 18 20:57:49 2018 +0100

--
 .../taskdefs/optional/depend/AntAnalyzer.java   | 33 +++-
 1 file changed, 25 insertions(+), 8 deletions(-)
--


http://git-wip-us.apache.org/repos/asf/ant/blob/aff7eefe/src/main/org/apache/tools/ant/taskdefs/optional/depend/AntAnalyzer.java
--
diff --git 
a/src/main/org/apache/tools/ant/taskdefs/optional/depend/AntAnalyzer.java 
b/src/main/org/apache/tools/ant/taskdefs/optional/depend/AntAnalyzer.java
index b9c93fa..9aa3b78 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/AntAnalyzer.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/AntAnalyzer.java
@@ -61,23 +61,24 @@ public class AntAnalyzer extends AbstractAnalyzer {
 analyzedDeps.clear();
 for (String classname : toAnalyze) {
 dependencies.add(classname);
+File container = null;
 try {
-File container = getClassContainer(classname);
-if (container == null) {
-continue;
-}
+container = getClassContainer(classname);
+} catch (IOException ioe) {
+// ignore
+}
+if (container != null) {
 containers.add(container);
 
 try (InputStream inStream = 
container.getName().endsWith(".class")
 ? 
Files.newInputStream(Paths.get(container.getPath()))
-: new 
ZipFile(container.getPath()).getInputStream(new ZipEntry(
-classname.replace('.', '/') + ".class"))) {
+: getZipEntryStream(new 
ZipFile(container.getPath()), classname)) {
 ClassFile classFile = new ClassFile();
 classFile.read(inStream);
 analyzedDeps.addAll(classFile.getClassRefs());
+} catch (IOException ioe) {
+// ignore
 }
-} catch (IOException ioe) {
-// ignore
 }
 }
 
@@ -96,6 +97,22 @@ public class AntAnalyzer extends AbstractAnalyzer {
 classes.addAll(dependencies);
 }
 
+private InputStream getZipEntryStream(ZipFile zipFile, String classname) 
throws IOException {
+InputStream zipEntryStream = zipFile.getInputStream(new ZipEntry(
+classname.replace('.', '/') + ".class"));
+return new InputStream() {
+@Override
+public int read() throws IOException {
+return zipEntryStream.read();
+}
+@Override
+public void close() throws IOException {
+zipEntryStream.close();
+zipFile.close();
+}
+};
+}
+
 /**
  * Indicate if this analyzer can determine dependent files.
  *



ant git commit: Revert: any RuntimeException must be wrapped

2018-11-18 Thread gintas
Repository: ant
Updated Branches:
  refs/heads/master d6f1dc6bd -> 9321ea62b


Revert: any RuntimeException must be wrapped

Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/9321ea62
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/9321ea62
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/9321ea62

Branch: refs/heads/master
Commit: 9321ea62bf774db037a102d594dcfe174c249488
Parents: d6f1dc6
Author: Gintas Grigelionis 
Authored: Sun Nov 18 20:14:56 2018 +0100
Committer: Gintas Grigelionis 
Committed: Sun Nov 18 20:14:56 2018 +0100

--
 src/main/org/apache/tools/ant/taskdefs/EchoXML.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
--


http://git-wip-us.apache.org/repos/asf/ant/blob/9321ea62/src/main/org/apache/tools/ant/taskdefs/EchoXML.java
--
diff --git a/src/main/org/apache/tools/ant/taskdefs/EchoXML.java 
b/src/main/org/apache/tools/ant/taskdefs/EchoXML.java
index 2f29948..571386d 100644
--- a/src/main/org/apache/tools/ant/taskdefs/EchoXML.java
+++ b/src/main/org/apache/tools/ant/taskdefs/EchoXML.java
@@ -86,7 +86,9 @@ public class EchoXML extends XMLFragment {
 try (OutputStream os = (file == null) ? new LogOutputStream(this, 
Project.MSG_INFO)
 : FileUtils.newOutputStream(file.toPath(), append)) {
 writer.write((Element) n, os);
-} catch (IOException e) {
+} catch (BuildException be) {
+throw be;
+} catch (Exception e) {
 throw new BuildException(e);
 }
 }



[jira] [Commented] (IVY-1586) Retrieves test-library instead of binary-library

2018-11-18 Thread jerome angibaud (JIRA)


[ 
https://issues.apache.org/jira/browse/IVY-1586?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16690842#comment-16690842
 ] 

jerome angibaud commented on IVY-1586:
--

Same issue with 
 

> Retrieves test-library instead of binary-library
> 
>
> Key: IVY-1586
> URL: https://issues.apache.org/jira/browse/IVY-1586
> Project: Ivy
>  Issue Type: Bug
>  Components: Ant
>Affects Versions: 2.5.0-rc1
> Environment: Eclipse Photon 4.8.0 64bit
> Ant 1.10.3.v20180417-1627
> Apache IvyDE 2.2.0.final-201311091524-RELEASE
> Apache Ivy 2.5.0.cr1_20180412005306
>Reporter: Arni Schulze
>Priority: Blocker
> Attachments: Ant_1st_output.txt, Ant_2nd_output.txt, build.xml, 
> ivy.xml
>
>
> If I delete the local Ivy cache and run my Ant script to retrieve 
> "ch.quos.logback logback-classic 1.2.3" I get the correct library and its 
> dependencies (see Ant_1st_output).
> But if I run the Ant script again (now having a local Ivy cache) it retrieves 
> the test-library and the test-library of the dependencies instead of the 
> correct ones (see Ant_2nd_output).
> I added minimalistic ivy.xml and Ant script. Because of the different 
> behavior of the first and every other run, I think this is a bug in Ivy.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)