Open jonathanwiesel opened 3 years ago
Affects PMD Version: 5.5.3+ 6.0.0+ 7.0.0
Rule:
ApexCRUDViolation
Description:
When a query is issued inside a map constructor the CRUD check is not enforced
Code Sample demonstrating the issue:
public class Foo { public void bar() { Map<Id, Account> accs = new Map<Id, Account>([SELECT Name FROM Account]); } }
Expected outcome:
PMD should report a violation at line 3, but doesn't. This is a false-negative.
Running PMD through: Apex PMD VS Code Plugin
Related to #3378 due to the difficulty of determining the appropriate type to check on maps
Affects PMD Version: 5.5.3+ 6.0.0+ 7.0.0
Rule:
ApexCRUDViolation
Description:
When a query is issued inside a map constructor the CRUD check is not enforced
Code Sample demonstrating the issue:
Expected outcome:
PMD should report a violation at line 3, but doesn't. This is a false-negative.
Running PMD through: Apex PMD VS Code Plugin