I just added a method to an enum. Whenever I invoke that method I get a NoSuchMethodError:
public enum PHASE {
PHASE1,
PHASE2(false),
PHASE3;
private boolean present = true;
PHASE() {
}
PHASE(boolean present) {
this.present = present;
}
public boolean isPresent() {
return this.present;
}
}
public void foo(PHASE phase) {
if (phase.isPresent()) {
...
Here phase.isPresent throws a NoSuchMethodError after clean/build. What am I missing?
--
UPDATE: Netbeans has two cache folders. One was empty, the other one was not. That is my bad, apparently I didn't put enough effort into the caching issue. Unfortunately I cannot downvote my own question...