infer no contracts for methods always returning null/true/false

they're likely to be used as constant-like flags for functionality being enabled or not (IDEA-166399)
This commit is contained in:
peter
2017-01-23 12:38:06 +01:00
parent 0920e84b91
commit 54624d1864
4 changed files with 38 additions and 28 deletions
@@ -3,10 +3,17 @@ class Fun {
public static final boolean isProduction = false;
public static final boolean isDebugInProduction = isDebug && isProduction;
public static boolean isFeatureEnabled() {
return true;
}
void foo() {
if (isDebug) {
System.out.println();
}
if (isFeatureEnabled()) {
System.out.println();
}
}
void fooNegated() {
if (!isDebug) {