A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/pmd/pmd/issues/1090 below:

checks not detected if done in another method · Issue #1090 · pmd/pmd · GitHub

Affects PMD Version: 6.3

Rule: ApexCRUDViolation

Description: If I have a helper class and method to do CRUD checks, the rule flags them even if checks were done.

Code Sample demonstrating the issue:

class MyClass {

void itShouldDoTheThing(SObject myObject) { 
    if(Utility.checkCRUD(myObject) {
        update myObject; //This gets flagged as missing CRUD check
    }
}

class Utility {
static Boolean checkCRUD(SObject myObject) {
    return globalDescribe.get(myObject).getDescribe().isUpdatable();
}
}

Running PMD through: CLI


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4