effectively final: check flow at variable start (IDEA-114737)

This commit is contained in:
anna
2013-10-10 18:39:58 +02:00
parent 46e9f4beca
commit b33fa7fc25
2 changed files with 16 additions and 2 deletions
@@ -898,7 +898,8 @@ public class ControlFlowUtil {
@Override
public Boolean getResult() {
return !maybeUnassigned[0];
final int variableDeclarationOffset = flow.getStartOffset(variable.getParent());
return !maybeUnassigned[variableDeclarationOffset > -1 ? variableDeclarationOffset : 0];
}
}
if (flow.getSize() == 0) return false;
@@ -114,4 +114,17 @@ class ParameterIsEffectivelyFinal {
return 0;
};
}
}
}
class IDEA114737 {
private void on(String propertyName) {
if (!"taskServices".equals(propertyName)) {
return;
}
java.util.List<String> newList = null;
Comparable<String> c1 = o -> {
System.out.println(newList);
return 0;
};
}
}