Reported by Stephen Crawley

2004-03-19  Mark Wielaard  <mark@klomp.org>

	Reported by Stephen Crawley
	* java/io/FilePermission.java (implies): Use String.length() -1 to
	access last char of String.

From-SVN: r79701
This commit is contained in:
Mark Wielaard 2004-03-19 22:05:33 +00:00 committed by Michael Koch
parent a6002f8d29
commit d511a27346
2 changed files with 8 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2004-03-19 Mark Wielaard <mark@klomp.org>
Reported by Stephen Crawley
* java/io/FilePermission.java (implies): Use String.length() -1 to
access last char of String.
2004-03-19 Michael Koch <konqueror@gmx.de>
* java/awt/image/AffineTransformOp.java

View File

@ -271,9 +271,9 @@ public final class FilePermission extends Permission implements Serializable
break;
*/
default:
if(f2.charAt(f2.length()) == File.separatorChar)
if(f2.charAt(f2.length() - 1) == File.separatorChar)
{
if(!f1.equals(f2.substring(0,f2.length()-1)))
if(!f1.equals(f2.substring(0,f2.length() - 1)))
return false;
}
else