Need reviewer for 6925932: (file) Path.endsWith can throw ArrayIndexOutOfBoundsException (unx)

Alan Bateman Alan.Bateman at Sun.COM
Fri Feb 12 08:09:23 PST 2010


This is small bug in the Unix implementation of Path.endsWith. Where the 
given path has fewer name elements than the base path but they are 
longer than the corresponding name elements in the base path then the 
comparison can fail with ArrayIndexOutOfBoundException. The reason is 
that the original implementation is missing a length check and is 
trivially fixed. The webrev is here and the test cases expanded to 
better exercise this method:
   http://cr.openjdk.java.net/~alanb/6925932/webrev.00/

Thanks,
Alan.


More information about the nio-dev mailing list