clean some eclipse warning

git-svn-id: https://svn.apache.org/repos/asf/incubator/ivy/core/trunk@592128 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Scokart Gilles 2007-11-05 19:35:30 +00:00
parent 858163e57d
commit 4ecc5c9942
7 changed files with 21 additions and 19 deletions

View File

@ -16,3 +16,4 @@
specific language governing permissions and limitations
under the License.
-->
<project/>

View File

@ -16,3 +16,4 @@
specific language governing permissions and limitations
under the License.
-->
<project/>

View File

@ -16,3 +16,4 @@
specific language governing permissions and limitations
under the License.
-->
<project/>

View File

@ -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();

View File

@ -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');
// }
}

View File

@ -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);
}
}
}

View File

@ -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) {