-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Description
Description
This call to a generic collection method contains an argument with an incompatible class from that of the collection's parameter.
Discussion
No response
Motivation
Code clarity and consistency
Details
The method removeAssertion
is attempting to remove an AttributeType
object from a list of AssertionType
objects:
keycloak/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/mdattr/EntityAttributes.java
Lines 57 to 59 in 9e7ef79
public void removeAssertion(AttributeType attributeType) { | |
assertion.remove(attributeType); | |
} |
Additionally, consider adjusting the variable names for both the addAssertion
and removeAssertion
methods to avoid obfuscation.
keycloak/saml-core-api/src/main/java/org/keycloak/dom/saml/v2/mdattr/EntityAttributes.java
Lines 53 to 59 in 9e7ef79
public void addAssertion(AssertionType attributeType) { | |
assertion.add(attributeType); | |
} | |
public void removeAssertion(AttributeType attributeType) { | |
assertion.remove(attributeType); | |
} |
Found by Linux Verification Center with SVACE