Back to all rules
What this rule checks
State-setting functions not called from event handlers
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
void draw() {
  fill(255, 0, 0);
  ellipse(x, y, 50, 50);
}
FAIL — this code triggers the rule
void mousePressed() {
  fill(255, 0, 0); // state-setting in event handler
}
Overview
Category PDPS
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.DecentralizedDrawStateRule
Message template Do not use state-setting function {0} in event handler {1}.