mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-26 12:23:59 +08:00
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:
parent
a6002f8d29
commit
d511a27346
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user