src.samples.java.ex.ENMI_Sample Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sb-contrib Show documentation
Show all versions of sb-contrib Show documentation
An auxiliary findbugs.sourceforge.net plugin for java bug detectors that fall outside the narrow scope of detectors to be packaged with the product itself.
The newest version!
package ex;
import ex.SPP_Sample.Flap;
public class ENMI_Sample {
public enum Johnny {
ONE_NOTE
}
private Johnny j;
public ENMI_Sample() {
}
public void improperEnum(boolean b, boolean x) {
j = null;
if (b) {
j = Johnny.ONE_NOTE;
Johnny other = null;
if (x) {
other = Johnny.ONE_NOTE;
}
}
}
public void equalsOnEnum(Flap f) {
if (f.equals(Flap.Jack)) {
System.out.println("Flap Jacks");
}
}
}
enum ENMIFP {
C1 {
},
C2 {
}
}
enum ENMISingletonFP {
INSTANCE {
public void doIt() {
};
}
}