diff --git a/test/buildlist/A/build.xml b/test/buildlist/A/build.xml index 1c1b8cf7..d14ee639 100644 --- a/test/buildlist/A/build.xml +++ b/test/buildlist/A/build.xml @@ -16,3 +16,4 @@ specific language governing permissions and limitations under the License. --> + \ No newline at end of file diff --git a/test/buildlist/B/build.xml b/test/buildlist/B/build.xml index 1c1b8cf7..d14ee639 100644 --- a/test/buildlist/B/build.xml +++ b/test/buildlist/B/build.xml @@ -16,3 +16,4 @@ specific language governing permissions and limitations under the License. --> + \ No newline at end of file diff --git a/test/buildlist/C/build.xml b/test/buildlist/C/build.xml index 1c1b8cf7..d14ee639 100644 --- a/test/buildlist/C/build.xml +++ b/test/buildlist/C/build.xml @@ -16,3 +16,4 @@ specific language governing permissions and limitations under the License. --> + \ No newline at end of file diff --git a/test/java/org/apache/ivy/ant/IvyConfigureTest.java b/test/java/org/apache/ivy/ant/IvyConfigureTest.java index 11c54685..0f09bca4 100644 --- a/test/java/org/apache/ivy/ant/IvyConfigureTest.java +++ b/test/java/org/apache/ivy/ant/IvyConfigureTest.java @@ -100,6 +100,7 @@ public class IvyConfigureTest extends TestCase { assertEquals("myvalue", settings.getVariables().get("myproperty")); } + /*@SuppressWarnings*/ public void testURL() throws Exception { String confUrl = new File("test/repositories/ivysettings.xml").toURL().toExternalForm(); String confDirUrl = new File("test/repositories").toURL().toExternalForm(); diff --git a/test/java/org/apache/ivy/ant/IvyConvertPomTest.java b/test/java/org/apache/ivy/ant/IvyConvertPomTest.java index 6b32979a..8b047f8b 100644 --- a/test/java/org/apache/ivy/ant/IvyConvertPomTest.java +++ b/test/java/org/apache/ivy/ant/IvyConvertPomTest.java @@ -17,15 +17,10 @@ */ package org.apache.ivy.ant; -import java.io.BufferedReader; import java.io.File; -import java.io.FileReader; -import java.io.IOException; -import java.io.InputStreamReader; import junit.framework.TestCase; -import org.apache.ivy.util.FileUtil; import org.apache.tools.ant.Project; public class IvyConvertPomTest extends TestCase { @@ -38,16 +33,19 @@ public class IvyConvertPomTest extends TestCase { task.setIvyFile(destFile); task.execute(); - String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(destFile))); - String expected = readEntirely("test-convertpom.xml").replaceAll("\r\n", "\n").replace( - '\r', '\n'); - // do not work properly on all platform and depends on the file date - // assertEquals(expected, wrote); + //do not work properly on all platform and depends on the file date + //keep the code in comments in case someone manage to fix this and to highlight the fact + //that this is not checked + +// String wrote = FileUtil.readEntirely(new BufferedReader(new FileReader(destFile))); +// String expected = readEntirely("test-convertpom.xml").replaceAll("\r\n", "\n").replace( +// '\r', '\n'); +// assertEquals(expected, wrote); } - private String readEntirely(String resource) throws IOException { - return FileUtil.readEntirely( - new BufferedReader(new InputStreamReader(IvyConvertPomTest.class.getResource(resource) - .openStream()))).replaceAll("\r\n", "\n").replace('\r', '\n'); - } +// private String readEntirely(String resource) throws IOException { +// return FileUtil.readEntirely( +// new BufferedReader(new InputStreamReader(IvyConvertPomTest.class.getResource(resource) +// .openStream()))).replaceAll("\r\n", "\n").replace('\r', '\n'); +// } } diff --git a/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java b/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java index 29260e03..14d89a05 100644 --- a/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java +++ b/test/java/org/apache/ivy/plugins/matcher/AbstractPatternMatcherTest.java @@ -65,7 +65,7 @@ public abstract class AbstractPatternMatcherTest extends TestCase { public void testNullExpression() { try { - Matcher matcher = patternMatcher.getMatcher(null); + patternMatcher.getMatcher(null); fail("Should fail for null expression"); } catch (NullPointerException expected) { @@ -80,7 +80,7 @@ public abstract class AbstractPatternMatcherTest extends TestCase { "this is an expression", "whatever this is", "maybe, maybe not"}; for (int i = 0; i < 100000; i++) { String input = inputs[i % inputs.length]; - boolean success = matcher.matches(input); + matcher.matches(input); } } @@ -90,7 +90,7 @@ public abstract class AbstractPatternMatcherTest extends TestCase { for (int i = 0; i < 100000; i++) { String expression = inputs[i % inputs.length]; - Matcher matcher = patternMatcher.getMatcher(expression); + patternMatcher.getMatcher(expression); } } } diff --git a/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java b/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java index 2bb45015..edd011eb 100644 --- a/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java +++ b/test/java/org/apache/ivy/plugins/matcher/GlobPatternMatcherTest.java @@ -71,7 +71,7 @@ public class GlobPatternMatcherTest extends AbstractPatternMatcherTest { public void testInvalidSyntax() { try { - Matcher matcher = patternMatcher.getMatcher("["); + patternMatcher.getMatcher("["); fail("Should fail on invalid regexp syntax"); } catch (PatternSyntaxException e) {