8000 Unrelated Types. SAST · Issue #40027 · keycloak/keycloak · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Unrelated Types. SAST #40027
Closed
Closed
@Anchels

Description

@Anchels

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:

public void removeAssertion(AttributeType attributeType) {
assertion.remove(attributeType);
}


Additionally, consider adjusting the variable names for both the addAssertion and removeAssertion methods to avoid obfuscation.

public void addAssertion(AssertionType attributeType) {
assertion.add(attributeType);
}
public void removeAssertion(AttributeType attributeType) {
assertion.remove(attributeType);
}


Found by Linux Verification Center with SVACE

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0