-
Bug
-
Resolution: Duplicate
-
P4
-
None
-
1.5.1, 2.0, 3.0, 4.0, 5.0, 6, 7, 8, 9
When null is passed to SecureRandom algorithm in getInstance factory, then NPE is thrown.
However spec (see in comments) is silent about this behavior.
SecureRandom.getInstance(null) -> throws NPE
SecureRandom.getInstance(null, DrbgParameters.instantiation(-1, DrbgParameters.Capability.NONE,null)); -> throws NPE.
The getInstance variant which has only String parameter throws NPE for older java version up to 1.5 (i believe) as the stack trace gives info that it is originating from java.security.Provider#getService which is introduced in 1.5
The tests under development, attached the test case.
However spec (see in comments) is silent about this behavior.
SecureRandom.getInstance(null) -> throws NPE
SecureRandom.getInstance(null, DrbgParameters.instantiation(-1, DrbgParameters.Capability.NONE,null)); -> throws NPE.
The getInstance variant which has only String parameter throws NPE for older java version up to 1.5 (i believe) as the stack trace gives info that it is originating from java.security.Provider#getService which is introduced in 1.5
The tests under development, attached the test case.
- duplicates
-
JDK-4985694 Incomplete spec for most of the getInstances
- Closed