Back to all rules
What this rule checks
Uses Integer.MAX_VALUE or Integer.MIN_VALUE
Configuration
When off, this rule is excluded from pipeline runs. Changes apply immediately.
Code Examples
PASS — this code satisfies the rule
int leftmost = 400;  // start at the right edge of the window

void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  leftmost = min(leftmost, mouseX);
  line(leftmost, 0, leftmost, height);
}
FAIL — this code triggers the rule
int leftmost = Integer.MAX_VALUE;

void setup() {
  size(400, 400);
}

void draw() {
  background(255);
  leftmost = min(leftmost, mouseX);
  line(leftmost, 0, leftmost, height);
}
Overview
Category Out of Scope
Type Custom Zita
Priority 3 (1 = highest, 5 = lowest)
Status Active
PMD Configuration
Java class nl.utwente.processing.pmd.rules.HasIntegerConstantsRule
Message template Integer.MAX_VALUE/MIN_VALUE usage found.