Lines 1-5
Link Here
|
1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
2 |
* Copyright (c) 2000, 2009 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
Lines 32-43
Link Here
|
32 |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { |
32 |
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { |
33 |
LocalVariableBinding local = this.expression.localVariableBinding(); |
33 |
LocalVariableBinding local = this.expression.localVariableBinding(); |
34 |
if (local != null && (local.type.tagBits & TagBits.IsBaseType) == 0) { |
34 |
if (local != null && (local.type.tagBits & TagBits.IsBaseType) == 0) { |
35 |
flowContext.recordUsingNullReference(currentScope, local, |
|
|
36 |
this.expression, FlowContext.CAN_ONLY_NULL | FlowContext.IN_INSTANCEOF, flowInfo); |
37 |
flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo). |
35 |
flowInfo = this.expression.analyseCode(currentScope, flowContext, flowInfo). |
38 |
unconditionalInits(); |
36 |
unconditionalInits(); |
39 |
FlowInfo initsWhenTrue = flowInfo.copy(); |
37 |
FlowInfo initsWhenTrue = flowInfo.copy(); |
40 |
initsWhenTrue.markAsComparedEqualToNonNull(local); |
38 |
initsWhenTrue.markAsComparedEqualToNonNull(local); |
|
|
39 |
flowContext.recordUsingNullReference(currentScope, local, |
40 |
this.expression, FlowContext.CAN_ONLY_NULL | FlowContext.IN_INSTANCEOF, flowInfo); |
41 |
// no impact upon enclosing try context |
41 |
// no impact upon enclosing try context |
42 |
return FlowInfo.conditional(initsWhenTrue, flowInfo.copy()); |
42 |
return FlowInfo.conditional(initsWhenTrue, flowInfo.copy()); |
43 |
} |
43 |
} |