-
Type:
Bug
-
Resolution: Won't Fix
-
Priority:
P4
-
Affects Version/s: 8
-
Component/s: security-libs
-
Fix Understood
-
generic
-
generic
A DESCRIPTION OF THE PROBLEM :
new PrivateCredentialPermission("x y \" leading\"", "read");
If name does not conform to the correct syntax, this API should throw IllegalArgumentException, but for leading blank char, it throws StringIndexOutOfBoundsException
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 1
---------- BEGIN SOURCE ----------
import javax.security.auth.*;
public class Test {
public static void main(String[] args) {
new PrivateCredentialPermission("x y \" leading\"", "read");
}
}
---------- END SOURCE ----------
new PrivateCredentialPermission("x y \" leading\"", "read");
If name does not conform to the correct syntax, this API should throw IllegalArgumentException, but for leading blank char, it throws StringIndexOutOfBoundsException
Exception in thread "main" java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 1
---------- BEGIN SOURCE ----------
import javax.security.auth.*;
public class Test {
public static void main(String[] args) {
new PrivateCredentialPermission("x y \" leading\"", "read");
}
}
---------- END SOURCE ----------