< prev index next >

src/java.base/windows/classes/java/io/WinNTFileSystem.java

Print this page
rev 52387 : 8211752: JNU_ThrowIOExceptionWithLastErrorAndPath - enhance some IOExceptions with path causing the issue


 654                     }
 655                 }
 656             }
 657         }
 658         return getNameMax0(s);
 659     }
 660 
 661     @Override
 662     public int compare(File f1, File f2) {
 663         return f1.getPath().compareToIgnoreCase(f2.getPath());
 664     }
 665 
 666     @Override
 667     public int hashCode(File f) {
 668         /* Could make this more efficient: String.hashCodeIgnoreCase */
 669         return f.getPath().toLowerCase(Locale.ENGLISH).hashCode() ^ 1234321;
 670     }
 671 
 672     private static native void initIDs();
 673 


 674     static {
 675         initIDs();



 676     }
 677 }


 654                     }
 655                 }
 656             }
 657         }
 658         return getNameMax0(s);
 659     }
 660 
 661     @Override
 662     public int compare(File f1, File f2) {
 663         return f1.getPath().compareToIgnoreCase(f2.getPath());
 664     }
 665 
 666     @Override
 667     public int hashCode(File f) {
 668         /* Could make this more efficient: String.hashCodeIgnoreCase */
 669         return f.getPath().toLowerCase(Locale.ENGLISH).hashCode() ^ 1234321;
 670     }
 671 
 672     private static native void initIDs();
 673 
 674     private static native void initIncludeInExceptions(boolean b);
 675 
 676     static {
 677         initIDs();
 678         final String key="jdk.filesystem.path.includeInExceptions";
 679         Boolean tmp = java.security.AccessController.doPrivileged(new sun.security.action.GetBooleanAction(key));
 680         initIncludeInExceptions(tmp.booleanValue());
 681     }
 682 }
< prev index next >