mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user