Affects PMD Version: 6.22.0
Rule: ApexCRUDViolation
Description:
When "WITH SECURITY_ENFORCED" is given in a separate line, then it is not seen by the rule. The rule reports a violation then.
Code Sample demonstrating the issue:
public class Foo {
public Contact foo(String tempID) {
Contact c = [SELECT Name FROM Contact WHERE Id=: tempID
WITH SECURITY_ENFORCED];
return c;
}
}
Expected outcome:
- This is a false-positive, since "WITH SECURITY_ENFORCED" is present.
Affects PMD Version: 6.22.0
Rule: ApexCRUDViolation
Description:
When "WITH SECURITY_ENFORCED" is given in a separate line, then it is not seen by the rule. The rule reports a violation then.
Code Sample demonstrating the issue:
Expected outcome: