langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
changeset 3782 ae62279eeb46
parent 3380 a6c2bcab0fec
child 3995 73af8b6fb8bc
child 3890 b53fced26fa4
--- 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();
     }
 }