--- a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java Thu Sep 03 18:34:17 2009 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java Tue Sep 08 11:12:13 2009 -0700
@@ -34,7 +34,6 @@
import java.io.OutputStreamWriter;
import java.io.Writer;
import java.net.URI;
-import java.net.URISyntaxException;
import java.nio.ByteBuffer;
import java.nio.CharBuffer;
import java.nio.charset.CharsetDecoder;
@@ -73,6 +72,7 @@
return new FileInputStream(f);
}
+ @Override
protected CharsetDecoder getDecoder(boolean ignoreEncodingErrors) {
return fileManager.getDecoder(fileManager.getEncodingName(), ignoreEncodingErrors);
}
@@ -147,6 +147,7 @@
}
@Deprecated
+ @Override
public String getPath() {
return f.getPath();
}
@@ -201,11 +202,6 @@
}
public URI toUri() {
- try {
- String path = f.getAbsolutePath().replace(File.separatorChar, '/');
- return new URI("file://" + path).normalize();
- } catch (URISyntaxException ex) {
- return f.toURI();
- }
+ return f.toURI().normalize();
}
}