--- a/langtools/test/tools/javac/api/6440333/T6440333.java Thu Sep 03 18:34:17 2009 -0700
+++ b/langtools/test/tools/javac/api/6440333/T6440333.java Tue Sep 08 11:12:13 2009 -0700
@@ -26,7 +26,6 @@
* @bug 6440333
* @summary SimpleJavaFileObject.toString() generates URI with some extra message
* @author Peter von der Ah\u00e9
- * @ignore 6877223 test ignored because of issues with File.toUri on Windows (6877206)
* @library ../lib
* @compile T6440333.java
* @run main T6440333
@@ -34,6 +33,7 @@
import java.io.File;
import java.io.IOException;
+import java.net.URI;
import javax.tools.JavaFileObject;
public class T6440333 extends ToolTester {
@@ -41,14 +41,10 @@
File path = test_src.getCanonicalFile();
File src = new File(new File(path, "."), "T6440333.java");
JavaFileObject fo = fm.getJavaFileObjects(src).iterator().next();
- String expect = src.getCanonicalFile().getPath().replace(File.separatorChar, '/');
+ URI expect = src.getCanonicalFile().toURI();
System.err.println("Expect " + expect);
- // CURRENTLY, the following line fails on Windows because a file C:/w/jjg/...
- // returns a URI file://C/w/jjg... which incorrectly encodes the drive letter
- // in the URI authority. This is against the spec that the authority is
- // undefined and breaks the contract that new File(f.toURI()).equals(f.getAbsoluteFile())
- System.err.println("Got: " + fo.toUri().getPath());
- if (!expect.equals(fo.toUri().getPath())) {
+ System.err.println("Found " + fo.toUri());
+ if (!expect.equals(fo.toUri())) {
throw new AssertionError();
}
}