Skip to content

Files

Latest commit

 

History

History
29 lines (20 loc) · 602 Bytes

JenkinsObjectOverrideOnlyNonCpsMethods.md

File metadata and controls

29 lines (20 loc) · 602 Bytes

Pattern: Overridden method is CPS transformed

Issue: -

Description

Overridden methods of the standard library (e.g. from java.lang.Object) are often called from there and therefore must not be CPS transformed in Jenkins.

Examples

class SomeClass {

    @Override // Violation
    String toString() {
        return ''
    }

    @NonCPS
    @Override // OK
    boolean equals(Object other) {
        return false
    }
}

Further Reading