-
CSR
-
Resolution: Approved
-
P2
-
None
-
source
-
low
-
No compatibility risk. Instead, this is a specification error.
-
Java API
-
SE
Summary
KeyStoreException
is not thrown by KeyStoreSpi::engineGetAttributes
but the specification claims it could. The @throws
line should be removed.
Problem
The method specification is wrong that a KeyStoreException
could be thrown, but it shouldn't. The line was copied from KeyStore::getAttributes
but the check is already done inside that method and thus the keystore is guaranteed to have been initialized in this method.
Solution
Remove the @throws
line.
Specification
In src/java.base/share/classes/java/security/KeyStore.java
:
/*
....
- * @throws KeyStoreException if the keystore has not been initialized
- * (loaded).
- *
* @since 18
*/
public Set<Entry.Attribute> engineGetAttributes(String alias);
- csr of
-
JDK-8278247 KeyStoreSpi::engineGetAttributes does not throws KeyStoreException
-
- Resolved
-