You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2017/12/02 17:52:05 UTC

ant git commit: make things compile on Java5 again

Repository: ant
Updated Branches:
  refs/heads/1.9.x b9f78abff -> dd1ac8f23


make things compile on Java5 again


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

Branch: refs/heads/1.9.x
Commit: dd1ac8f23b40b1aa3b6f3b305c424b49f0754a8c
Parents: b9f78ab
Author: Stefan Bodewig <bo...@apache.org>
Authored: Sat Dec 2 18:51:44 2017 +0100
Committer: Stefan Bodewig <bo...@apache.org>
Committed: Sat Dec 2 18:51:44 2017 +0100

----------------------------------------------------------------------
 .../tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java   | 4 +++-
 .../apache/tools/ant/types/selectors/ModifiedSelectorTest.java   | 3 ++-
 2 files changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/dd1ac8f2/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
index 2579c82..3886fe7 100644
--- a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
+++ b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunnerTest.java
@@ -254,7 +254,9 @@ public class JUnitTestRunnerTest {
     public static class AssertionErrorTest {
         @Test
         public void throwsAssertionError() {
-            throw new AssertionError("failure message", new RuntimeException("cause message"));
+            AssertionError assertionError = new AssertionError("failure message");
+            assertionError.initCause(new RuntimeException("cause message"));
+            throw assertionError;
         }
     }
 }

http://git-wip-us.apache.org/repos/asf/ant/blob/dd1ac8f2/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
----------------------------------------------------------------------
diff --git a/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java b/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
index 496b7ae..92c0b94 100644
--- a/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
+++ b/src/tests/junit/org/apache/tools/ant/types/selectors/ModifiedSelectorTest.java
@@ -42,6 +42,7 @@ import org.apache.tools.ant.types.selectors.modifiedselector.HashvalueAlgorithm;
 import org.apache.tools.ant.types.selectors.modifiedselector.ModifiedSelector;
 import org.apache.tools.ant.types.selectors.modifiedselector.PropertiesfileCache;
 import org.apache.tools.ant.util.FileUtils;
+import org.apache.tools.ant.util.StringUtils;
 import org.junit.Assume;
 import org.junit.Before;
 import org.junit.Ignore;
@@ -947,7 +948,7 @@ public class ModifiedSelectorTest {
             try {
                 FileWriter out = new FileWriter(file.getAbsolutePath(), true);
                 out.write(line);
-                out.write(System.lineSeparator());
+                out.write(StringUtils.LINE_SEP);
                 out.flush();
                 out.close();
             } catch (Exception e) {