mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
boolean binary expressions of the format false && non_constant and true || non_constant can be evaluated as constant at compile time
This commit is contained in:
@@ -9,6 +9,12 @@ public class ClassWithConstants {
|
||||
public static final byte BYTE_CONST = 4;
|
||||
public static final char CHAR_CONST = '5';
|
||||
public static final boolean BOOL_CONST = true;
|
||||
|
||||
public static final boolean BOOL_CONST2 = false && foo();
|
||||
public static final boolean BOOL_CONST3 = true || foo();
|
||||
static boolean foo() {
|
||||
return false;
|
||||
}
|
||||
public static final float FLOAT_CONST = 1.234f;
|
||||
public static final double DOUBLE_CONST = 3.456;
|
||||
public static final java.lang.String STRING_CONST = "a\r\n\"bcd";
|
||||
|
||||
Reference in New Issue
Block a user