src/windows/classes/sun/nio/fs/RegistryFileTypeDetector.java

Print this page

        

@@ -40,16 +40,16 @@
     public RegistryFileTypeDetector() {
         super();
     }
 
     @Override
-    public String implProbeContentType(FileRef file) throws IOException {
+    public String implProbeContentType(Path file) throws IOException {
         if (!(file instanceof Path))
             return null;
 
         // get file extension
-        Path name = ((Path)file).getName();
+        Path name = file.getFileName();
         if (name == null)
             return null;
         String filename = name.toString();
         int dot = filename.lastIndexOf('.');
         if ((dot < 0) || (dot == (filename.length()-1)))