Tristan Tarrant created ELY-1898:
------------------------------------
Summary: ServiceFactory<Credential> used in API is too strict
Key: ELY-1898
URL:
https://issues.jboss.org/browse/ELY-1898
Project: WildFly Elytron
Issue Type: Bug
Components: API / SPI
Affects Versions: 1.11.0.CR1
Reporter: Tristan Tarrant
In several places in the API, `SecurityFactory<Credential>` is used, but its bound
is too strict, disallowing passing in specific instances, e.g.
`SecurityFactory<GSSKerberosCredential>`.
These should all be replaced with `SecurityFactory<? extends Credential>`.
An example of code that doesn't work:
{code:java}
SecurityFactory<GSSKerberosCredential> ksf = ...;
CredentialSource cs = CredentialSource.fromSecurityFactory(ksf); // Compiler error:
required SecurityFactory<Credential> provided SecurityFactory<GSSCredential>
{code}
Similar issue in the following method:
{code:java}
MechanismConfiguration.setServerCredential(SecurityFactory<Credential>
credentialFactory)
{code}
--
This message was sent by Atlassian Jira
(v7.13.8#713008)