Open srikanth-sankaran opened 1 week ago
This is because of the incorrect asymmetry in org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(BlockScope, FlowContext, FlowInfo) between a regular case and a default.
Not entirely sure of this. Need to study in detail.
At the outset it does look like there is some inconsistent behavior. Cause may be different than hypothesized.
Found by code inspection:
With null analysis enabled, we report two warnings in foo(Object)
Null comparison always yields false: The variable o cannot be null at this location
but none in foo(X) (with redundant null check set to warning)This is because of the incorrect asymmetry in
org.eclipse.jdt.internal.compiler.ast.SwitchStatement.analyseCode(BlockScope, FlowContext, FlowInfo)
between a regular case and a default.