+2003-08-06 Tom Tromey <tromey@redhat.com>
+
+ * java/io/FilePermission.java (equals): Use correct index for
+ last character of path.
+
2003-08-06 Alan Modra <amodra@bigpond.net.au>
* acinclude.m4 (LIBGCJ_CONFIGURE): Remove AC_CANONICAL_BUILD.
/* Compare names, taking into account if they refer to a
* directory and one has a separator and the other does not.
*/
- if(f1.charAt(f1.length()) == File.separatorChar)
+ if(f1.length() > 0 && f1.charAt(f1.length() - 1) == File.separatorChar)
{
- if(f2.charAt(f2.length()) == File.separatorChar)
+ if(f2.length() > 0
+ && f2.charAt(f2.length() - 1) == File.separatorChar)
{
if(!f2.equals(f1))
return false;
}
else
{
- if(f2.charAt(f2.length()) == File.separatorChar)
+ if(f2.length() > 0
+ && f2.charAt(f2.length() - 1) == File.separatorChar)
{
if(!f1.equals(f2.substring(0,f2.length()-1)))
return false;