View | Details | Raw Unified | Return to bug 338234 | Differences between
and this patch

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/AND_AND_Expression.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 57-63 Link Here
57
		if (isLeftOptimizedFalse) {
57
		if (isLeftOptimizedFalse) {
58
			if ((rightInfo.reachMode() & FlowInfo.UNREACHABLE) == 0) {
58
			if ((rightInfo.reachMode() & FlowInfo.UNREACHABLE) == 0) {
59
				currentScope.problemReporter().fakeReachable(this.right);
59
				currentScope.problemReporter().fakeReachable(this.right);
60
				rightInfo.setReachMode(FlowInfo.UNREACHABLE);
60
				rightInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
61
			}
61
			}
62
		}
62
		}
63
		rightInfo = this.right.analyseCode(currentScope, flowContext, rightInfo);
63
		rightInfo = this.right.analyseCode(currentScope, flowContext, rightInfo);
(-)compiler/org/eclipse/jdt/internal/compiler/ast/AssertStatement.java (-1 / +1 lines)
Lines 56-62 Link Here
56
	UnconditionalFlowInfo assertWhenTrueInfo = conditionFlowInfo.initsWhenTrue().unconditionalInits();
56
	UnconditionalFlowInfo assertWhenTrueInfo = conditionFlowInfo.initsWhenTrue().unconditionalInits();
57
	FlowInfo assertInfo = conditionFlowInfo.initsWhenFalse();
57
	FlowInfo assertInfo = conditionFlowInfo.initsWhenFalse();
58
	if (isOptimizedTrueAssertion) {
58
	if (isOptimizedTrueAssertion) {
59
		assertInfo.setReachMode(FlowInfo.UNREACHABLE);
59
		assertInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
60
	}
60
	}
61
61
62
	if (this.exceptionArgument != null) {
62
	if (this.exceptionArgument != null) {
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ConditionalExpression.java (-6 / +6 lines)
Lines 55-61 Link Here
55
		FlowInfo trueFlowInfo = flowInfo.initsWhenTrue().copy();
55
		FlowInfo trueFlowInfo = flowInfo.initsWhenTrue().copy();
56
		if (isConditionOptimizedFalse) {
56
		if (isConditionOptimizedFalse) {
57
			if ((mode & FlowInfo.UNREACHABLE) == 0) {
57
			if ((mode & FlowInfo.UNREACHABLE) == 0) {
58
				trueFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
58
				trueFlowInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
59
			}
59
			}
60
			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
60
			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
61
				this.valueIfTrue.complainIfUnreachable(trueFlowInfo, currentScope, initialComplaintLevel);
61
				this.valueIfTrue.complainIfUnreachable(trueFlowInfo, currentScope, initialComplaintLevel);
Lines 68-74 Link Here
68
		FlowInfo falseFlowInfo = flowInfo.initsWhenFalse().copy();
68
		FlowInfo falseFlowInfo = flowInfo.initsWhenFalse().copy();
69
		if (isConditionOptimizedTrue) {
69
		if (isConditionOptimizedTrue) {
70
			if ((mode & FlowInfo.UNREACHABLE) == 0) {
70
			if ((mode & FlowInfo.UNREACHABLE) == 0) {
71
				falseFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
71
				falseFlowInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
72
			}
72
			}
73
			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
73
			if (!isKnowDeadCodePattern(this.condition) || currentScope.compilerOptions().reportDeadCodeInTrivialIfStatement) {
74
				this.valueIfFalse.complainIfUnreachable(falseFlowInfo, currentScope, initialComplaintLevel);
74
				this.valueIfFalse.complainIfUnreachable(falseFlowInfo, currentScope, initialComplaintLevel);
Lines 98-113 Link Here
98
			UnconditionalFlowInfo trueInfoWhenFalse = trueFlowInfo.initsWhenFalse().unconditionalInits();
98
			UnconditionalFlowInfo trueInfoWhenFalse = trueFlowInfo.initsWhenFalse().unconditionalInits();
99
			UnconditionalFlowInfo falseInfoWhenFalse = falseFlowInfo.initsWhenFalse().unconditionalInits();
99
			UnconditionalFlowInfo falseInfoWhenFalse = falseFlowInfo.initsWhenFalse().unconditionalInits();
100
			if (isValueIfTrueOptimizedFalse) {
100
			if (isValueIfTrueOptimizedFalse) {
101
				trueInfoWhenTrue.setReachMode(FlowInfo.UNREACHABLE);				
101
				trueInfoWhenTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);				
102
			}
102
			}
103
			if (isValueIfFalseOptimizedFalse) {
103
			if (isValueIfFalseOptimizedFalse) {
104
				falseInfoWhenTrue.setReachMode(FlowInfo.UNREACHABLE);	
104
				falseInfoWhenTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);	
105
			}
105
			}
106
			if (isValueIfTrueOptimizedTrue) {
106
			if (isValueIfTrueOptimizedTrue) {
107
				trueInfoWhenFalse.setReachMode(FlowInfo.UNREACHABLE);	
107
				trueInfoWhenFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);	
108
			}
108
			}
109
			if (isValueIfFalseOptimizedTrue) {
109
			if (isValueIfFalseOptimizedTrue) {
110
				falseInfoWhenFalse.setReachMode(FlowInfo.UNREACHABLE);	
110
				falseInfoWhenFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);	
111
			}
111
			}
112
			mergedInfo =
112
			mergedInfo =
113
				FlowInfo.conditional(
113
				FlowInfo.conditional(
(-)compiler/org/eclipse/jdt/internal/compiler/ast/ForStatement.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 135-141 Link Here
135
				} else {
135
				} else {
136
					actionInfo = initsWhenTrue.unconditionalCopy();
136
					actionInfo = initsWhenTrue.unconditionalCopy();
137
					if (isConditionOptimizedFalse){
137
					if (isConditionOptimizedFalse){
138
						actionInfo.setReachMode(FlowInfo.UNREACHABLE);
138
						actionInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
139
					}
139
					}
140
				}
140
				}
141
			if (this.action.complainIfUnreachable(actionInfo, this.scope, initialComplaintLevel) < Statement.COMPLAINED_UNREACHABLE) {
141
			if (this.action.complainIfUnreachable(actionInfo, this.scope, initialComplaintLevel) < Statement.COMPLAINED_UNREACHABLE) {
(-)compiler/org/eclipse/jdt/internal/compiler/ast/IfStatement.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 67-77 Link Here
67
	// process the THEN part
67
	// process the THEN part
68
	FlowInfo thenFlowInfo = conditionFlowInfo.safeInitsWhenTrue();
68
	FlowInfo thenFlowInfo = conditionFlowInfo.safeInitsWhenTrue();
69
	if (isConditionOptimizedFalse) {
69
	if (isConditionOptimizedFalse) {
70
		thenFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
70
		thenFlowInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
71
	}
71
	}
72
	FlowInfo elseFlowInfo = conditionFlowInfo.initsWhenFalse().copy();
72
	FlowInfo elseFlowInfo = conditionFlowInfo.initsWhenFalse().copy();
73
	if (isConditionOptimizedTrue) {
73
	if (isConditionOptimizedTrue) {
74
		elseFlowInfo.setReachMode(FlowInfo.UNREACHABLE);
74
		elseFlowInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
75
	}
75
	}
76
	if (((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) && 
76
	if (((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) && 
77
			((thenFlowInfo.tagBits & FlowInfo.UNREACHABLE) != 0)) {
77
			((thenFlowInfo.tagBits & FlowInfo.UNREACHABLE) != 0)) {
(-)compiler/org/eclipse/jdt/internal/compiler/ast/OR_OR_Expression.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 59-65 Link Here
59
		if (isLeftOptimizedTrue){
59
		if (isLeftOptimizedTrue){
60
			if ((rightInfo.reachMode() & FlowInfo.UNREACHABLE) == 0) {
60
			if ((rightInfo.reachMode() & FlowInfo.UNREACHABLE) == 0) {
61
				currentScope.problemReporter().fakeReachable(this.right);
61
				currentScope.problemReporter().fakeReachable(this.right);
62
				rightInfo.setReachMode(FlowInfo.UNREACHABLE);
62
				rightInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
63
			}
63
			}
64
		}
64
		}
65
		rightInfo = this.right.analyseCode(currentScope, flowContext, rightInfo);
65
		rightInfo = this.right.analyseCode(currentScope, flowContext, rightInfo);
(-)compiler/org/eclipse/jdt/internal/compiler/ast/TryStatement.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 150-156 Link Here
150
				ifTrue: [catchInits addPotentialInitializationsFrom: tryInits]."
150
				ifTrue: [catchInits addPotentialInitializationsFrom: tryInits]."
151
				*/
151
				*/
152
				if (this.tryBlock.statements == null) {
152
				if (this.tryBlock.statements == null) {
153
					catchInfo.setReachMode(FlowInfo.UNREACHABLE);
153
					catchInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
154
				}
154
				}
155
				catchInfo =
155
				catchInfo =
156
					this.catchBlocks[i].analyseCode(
156
					this.catchBlocks[i].analyseCode(
(-)compiler/org/eclipse/jdt/internal/compiler/ast/TypeDeclaration.java (-2 / +2 lines)
Lines 646-652 Link Here
646
				// branch, since the previous initializer already got the blame.
646
				// branch, since the previous initializer already got the blame.
647
				if (staticFieldInfo == FlowInfo.DEAD_END) {
647
				if (staticFieldInfo == FlowInfo.DEAD_END) {
648
					this.staticInitializerScope.problemReporter().initializerMustCompleteNormally(field);
648
					this.staticInitializerScope.problemReporter().initializerMustCompleteNormally(field);
649
					staticFieldInfo = FlowInfo.initial(this.maxFieldCount).setReachMode(FlowInfo.UNREACHABLE);
649
					staticFieldInfo = FlowInfo.initial(this.maxFieldCount).setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
650
				}
650
				}
651
			} else {
651
			} else {
652
				if ((nonStaticFieldInfo.tagBits & FlowInfo.UNREACHABLE) != 0)
652
				if ((nonStaticFieldInfo.tagBits & FlowInfo.UNREACHABLE) != 0)
Lines 662-668 Link Here
662
				// branch, since the previous initializer already got the blame.
662
				// branch, since the previous initializer already got the blame.
663
				if (nonStaticFieldInfo == FlowInfo.DEAD_END) {
663
				if (nonStaticFieldInfo == FlowInfo.DEAD_END) {
664
					this.initializerScope.problemReporter().initializerMustCompleteNormally(field);
664
					this.initializerScope.problemReporter().initializerMustCompleteNormally(field);
665
					nonStaticFieldInfo = FlowInfo.initial(this.maxFieldCount).setReachMode(FlowInfo.UNREACHABLE);
665
					nonStaticFieldInfo = FlowInfo.initial(this.maxFieldCount).setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
666
				}
666
				}
667
			}
667
			}
668
		}
668
		}
(-)compiler/org/eclipse/jdt/internal/compiler/ast/WhileStatement.java (-3 / +3 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 82-88 Link Here
82
			} else {
82
			} else {
83
				FlowInfo mergedInfo = flowInfo.copy().addInitializationsFrom(condInfo.initsWhenFalse());
83
				FlowInfo mergedInfo = flowInfo.copy().addInitializationsFrom(condInfo.initsWhenFalse());
84
				if (isConditionOptimizedTrue){
84
				if (isConditionOptimizedTrue){
85
					mergedInfo.setReachMode(FlowInfo.UNREACHABLE);
85
					mergedInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
86
				}
86
				}
87
				this.mergedInitStateIndex =
87
				this.mergedInitStateIndex =
88
					currentScope.methodScope().recordInitializationStates(mergedInfo);
88
					currentScope.methodScope().recordInitializationStates(mergedInfo);
Lines 104-110 Link Here
104
			} else {
104
			} else {
105
				actionInfo = condInfo.initsWhenTrue().copy();
105
				actionInfo = condInfo.initsWhenTrue().copy();
106
				if (isConditionOptimizedFalse){
106
				if (isConditionOptimizedFalse){
107
					actionInfo.setReachMode(FlowInfo.UNREACHABLE);
107
					actionInfo.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD);
108
				}
108
				}
109
			}
109
			}
110
110
(-)compiler/org/eclipse/jdt/internal/compiler/flow/ConditionalFlowInfo.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 195-201 Link Here
195
		this.tagBits &= ~UNREACHABLE;
195
		this.tagBits &= ~UNREACHABLE;
196
	}
196
	}
197
	else {
197
	else {
198
		this.tagBits |= UNREACHABLE;
198
		this.tagBits |= reachMode;
199
	}
199
	}
200
	this.initsWhenTrue.setReachMode(reachMode);
200
	this.initsWhenTrue.setReachMode(reachMode);
201
	this.initsWhenFalse.setReachMode(reachMode);
201
	this.initsWhenFalse.setReachMode(reachMode);
(-)compiler/org/eclipse/jdt/internal/compiler/flow/FinallyFlowContext.java (-9 / +9 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 229-242 Link Here
229
									scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
229
									scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
230
								}
230
								}
231
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
231
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
232
									flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
232
									flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
233
								}
233
								}
234
							} else if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NULL)) {
234
							} else if (checkType == (CAN_ONLY_NULL_NON_NULL | IN_COMPARISON_NULL)) {
235
								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
235
								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
236
									scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
236
									scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
237
								}
237
								}
238
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
238
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
239
									flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
239
									flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
240
								}
240
								}
241
							}
241
							}
242
							return;
242
							return;
Lines 252-258 Link Here
252
										scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
252
										scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
253
									}
253
									}
254
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
254
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
255
										flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
255
										flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
256
									}
256
									}
257
									return;
257
									return;
258
								case FlowContext.IN_COMPARISON_NON_NULL:
258
								case FlowContext.IN_COMPARISON_NON_NULL:
Lines 264-270 Link Here
264
										scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
264
										scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
265
									}
265
									}
266
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
266
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
267
										flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
267
										flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
268
									}
268
									}
269
									return;
269
									return;
270
								case FlowContext.IN_ASSIGNMENT:
270
								case FlowContext.IN_ASSIGNMENT:
Lines 314-327 Link Here
314
									scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
314
									scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
315
								}
315
								}
316
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
316
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
317
									flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
317
									flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
318
								}
318
								}
319
							} else {
319
							} else {
320
								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
320
								if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
321
									scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
321
									scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
322
								}
322
								}
323
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
323
								if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
324
									flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
324
									flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
325
								}
325
								}
326
							}
326
							}
327
							return;
327
							return;
Lines 342-348 Link Here
342
										scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
342
										scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
343
									}
343
									}
344
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
344
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
345
										flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
345
										flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
346
									}
346
									}
347
									return;
347
									return;
348
								case FlowContext.IN_COMPARISON_NON_NULL:
348
								case FlowContext.IN_COMPARISON_NON_NULL:
Lines 354-360 Link Here
354
										scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
354
										scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
355
									}
355
									}
356
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
356
									if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
357
										flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
357
										flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
358
									}
358
									}
359
									return;
359
									return;
360
								case FlowContext.IN_ASSIGNMENT:
360
								case FlowContext.IN_ASSIGNMENT:
(-)compiler/org/eclipse/jdt/internal/compiler/flow/FlowContext.java (-5 / +5 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 578-591 Link Here
578
						scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
578
						scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
579
					}
579
					}
580
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
580
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
581
						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
581
						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
582
					}
582
					}
583
				} else {
583
				} else {
584
					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
584
					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
585
						scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
585
						scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
586
					}
586
					}
587
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
587
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
588
						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
588
						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
589
					}
589
					}
590
				}
590
				}
591
				return;
591
				return;
Lines 609-615 Link Here
609
							scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
609
							scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
610
						}
610
						}
611
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
611
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
612
							flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
612
							flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
613
						}
613
						}
614
						return;
614
						return;
615
					case FlowContext.IN_COMPARISON_NON_NULL:
615
					case FlowContext.IN_COMPARISON_NON_NULL:
Lines 621-627 Link Here
621
							scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
621
							scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
622
						}
622
						}
623
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
623
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
624
							flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
624
							flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
625
						}
625
						}
626
						return;
626
						return;
627
					case FlowContext.IN_ASSIGNMENT:
627
					case FlowContext.IN_ASSIGNMENT:
(-)compiler/org/eclipse/jdt/internal/compiler/flow/FlowInfo.java (-13 / +28 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 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 22-30 Link Here
22
22
23
	public int tagBits; // REACHABLE by default
23
	public int tagBits; // REACHABLE by default
24
	public final static int REACHABLE = 0;
24
	public final static int REACHABLE = 0;
25
	public final static int UNREACHABLE = 1;
25
	/* unreachable code 
26
	public final static int NULL_FLAG_MASK = 2;
26
	 * eg. while (true);
27
27
	 *     i++;  --> unreachable code 
28
	 */
29
	public final static int UNREACHABLE_OR_DEAD = 1;
30
	/* unreachable code as inferred by null analysis
31
	 * eg. str = null;
32
	 *     if (str != null) {
33
	 *        // dead code
34
	 *     }
35
	 */
36
	public final static int UNREACHABLE_BY_NULLANALYSIS = 2;
37
	/*
38
	 * code unreachable in any fashion
39
	 */
40
	public final static int UNREACHABLE = UNREACHABLE_OR_DEAD | UNREACHABLE_BY_NULLANALYSIS;
41
	public final static int NULL_FLAG_MASK = 4;
42
	
28
	public final static int UNKNOWN = 1;
43
	public final static int UNKNOWN = 1;
29
	public final static int NULL = 2;
44
	public final static int NULL = 2;
30
	public final static int NON_NULL = 4;
45
	public final static int NON_NULL = 4;
Lines 355-361 Link Here
355
	UnconditionalFlowInfo mergedInfo;
370
	UnconditionalFlowInfo mergedInfo;
356
	if (isOptimizedTrue){
371
	if (isOptimizedTrue){
357
		if (initsWhenTrue == FlowInfo.DEAD_END && allowFakeDeadBranch) {
372
		if (initsWhenTrue == FlowInfo.DEAD_END && allowFakeDeadBranch) {
358
			mergedInfo = initsWhenFalse.setReachMode(FlowInfo.UNREACHABLE).
373
			mergedInfo = initsWhenFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD).
359
				unconditionalInits();
374
				unconditionalInits();
360
		}
375
		}
361
		else {
376
		else {
Lines 367-373 Link Here
367
	}
382
	}
368
	else if (isOptimizedFalse) {
383
	else if (isOptimizedFalse) {
369
		if (initsWhenFalse == FlowInfo.DEAD_END && allowFakeDeadBranch) {
384
		if (initsWhenFalse == FlowInfo.DEAD_END && allowFakeDeadBranch) {
370
			mergedInfo = initsWhenTrue.setReachMode(FlowInfo.UNREACHABLE).
385
			mergedInfo = initsWhenTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD).
371
				unconditionalInits();
386
				unconditionalInits();
372
		}
387
		}
373
		else {
388
		else {
Lines 394-400 Link Here
394
	UnconditionalFlowInfo mergedInfo;
409
	UnconditionalFlowInfo mergedInfo;
395
	if (isOptimizedTrue){
410
	if (isOptimizedTrue){
396
		if (initsWhenTrue == FlowInfo.DEAD_END && allowFakeDeadBranch) {
411
		if (initsWhenTrue == FlowInfo.DEAD_END && allowFakeDeadBranch) {
397
			mergedInfo = initsWhenFalse.setReachMode(FlowInfo.UNREACHABLE).
412
			mergedInfo = initsWhenFalse.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD).
398
				unconditionalInits();
413
				unconditionalInits();
399
		}
414
		}
400
		else {
415
		else {
Lines 406-412 Link Here
406
	}
421
	}
407
	else if (isOptimizedFalse) {
422
	else if (isOptimizedFalse) {
408
		if (initsWhenFalse == FlowInfo.DEAD_END && allowFakeDeadBranch) {
423
		if (initsWhenFalse == FlowInfo.DEAD_END && allowFakeDeadBranch) {
409
			mergedInfo = initsWhenTrue.setReachMode(FlowInfo.UNREACHABLE).
424
			mergedInfo = initsWhenTrue.setReachMode(FlowInfo.UNREACHABLE_OR_DEAD).
410
				unconditionalInits();
425
				unconditionalInits();
411
		}
426
		}
412
		else {
427
		else {
Lines 456-465 Link Here
456
}
471
}
457
472
458
/**
473
/**
459
 * Return REACHABLE if this flow info is reachable, UNREACHABLE
474
 * Find out the reachability mode of this flowInfo.
460
 * else.
475
 * @return REACHABLE if this flow info is reachable, otherwise
461
 * @return REACHABLE if this flow info is reachable, UNREACHABLE
476
 *         either UNREACHABLE_OR_DEAD or UNREACHABLE_BY_NULLANALYSIS.
462
 *         else
463
 */
477
 */
464
public int reachMode() {
478
public int reachMode() {
465
	return this.tagBits & UNREACHABLE;
479
	return this.tagBits & UNREACHABLE;
Lines 476-482 Link Here
476
490
477
/**
491
/**
478
 * Set this flow info reach mode and return this.
492
 * Set this flow info reach mode and return this.
479
 * @param reachMode one of {@link #REACHABLE REACHABLE} or {@link #UNREACHABLE UNREACHABLE}
493
 * @param reachMode one of {@link #REACHABLE REACHABLE}, {@link #UNREACHABLE_OR_DEAD UNREACHABLE_OR_DEAD},
494
 * {@link #UNREACHABLE_BY_NULLANALYSIS UNREACHABLE_BY_NULLANALYSIS} or {@link #UNREACHABLE UNREACHABLE}
480
 * @return this, with the reach mode set to reachMode
495
 * @return this, with the reach mode set to reachMode
481
 */
496
 */
482
abstract public FlowInfo setReachMode(int reachMode);
497
abstract public FlowInfo setReachMode(int reachMode);
(-)compiler/org/eclipse/jdt/internal/compiler/flow/LoopingFlowContext.java (-6 / +6 lines)
Lines 493-506 Link Here
493
						scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
493
						scope.problemReporter().localVariableRedundantCheckOnNonNull(local, reference);
494
					}
494
					}
495
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
495
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
496
						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
496
						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
497
					}
497
					}
498
				} else {
498
				} else {
499
					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
499
					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
500
						scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
500
						scope.problemReporter().localVariableNonNullComparedToNull(local, reference);
501
					}
501
					}
502
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
502
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
503
						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
503
						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
504
					}
504
					}
505
				}
505
				}
506
			} else if (flowInfo.isDefinitelyNull(local)) {
506
			} else if (flowInfo.isDefinitelyNull(local)) {
Lines 509-522 Link Here
509
						scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
509
						scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
510
					}
510
					}
511
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
511
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
512
						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
512
						flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
513
					}
513
					}
514
				} else {
514
				} else {
515
					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
515
					if ((this.tagBits & FlowContext.HIDE_NULL_COMPARISON_WARNING) == 0) {
516
						scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
516
						scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
517
					}
517
					}
518
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
518
					if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
519
						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
519
						flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
520
					}
520
					}
521
				}
521
				}
522
			} else if (this.upstreamNullFlowInfo.isDefinitelyNonNull(local) && !flowInfo.isPotentiallyNull(local) && !flowInfo.isPotentiallyUnknown(local)) {    
522
			} else if (this.upstreamNullFlowInfo.isDefinitelyNonNull(local) && !flowInfo.isPotentiallyNull(local) && !flowInfo.isPotentiallyUnknown(local)) {    
Lines 554-560 Link Here
554
							scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
554
							scope.problemReporter().localVariableRedundantCheckOnNull(local, reference);
555
						}
555
						}
556
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
556
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
557
							flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE);
557
							flowInfo.initsWhenFalse().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
558
						}
558
						}
559
						return;
559
						return;
560
					case FlowContext.IN_COMPARISON_NON_NULL:
560
					case FlowContext.IN_COMPARISON_NON_NULL:
Lines 566-572 Link Here
566
							scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
566
							scope.problemReporter().localVariableNullComparedToNonNull(local, reference);
567
						}
567
						}
568
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
568
						if (!flowInfo.isMarkedAsNullOrNonNullInAssertExpression(local)) {
569
							flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE);
569
							flowInfo.initsWhenTrue().setReachMode(FlowInfo.UNREACHABLE_BY_NULLANALYSIS);
570
						}
570
						}
571
						return;
571
						return;
572
					case FlowContext.IN_ASSIGNMENT:
572
					case FlowContext.IN_ASSIGNMENT:
(-)compiler/org/eclipse/jdt/internal/compiler/flow/UnconditionalFlowInfo.java (-3 / +3 lines)
Lines 731-737 Link Here
731
final public boolean isDefinitelyAssigned(FieldBinding field) {
731
final public boolean isDefinitelyAssigned(FieldBinding field) {
732
	// Mirrored in CodeStream.isDefinitelyAssigned(..)
732
	// Mirrored in CodeStream.isDefinitelyAssigned(..)
733
	// do not want to complain in unreachable code
733
	// do not want to complain in unreachable code
734
	if ((this.tagBits & UNREACHABLE) != 0) {
734
	if ((this.tagBits & UNREACHABLE_OR_DEAD) != 0) {
735
		return true;
735
		return true;
736
	}
736
	}
737
	return isDefinitelyAssigned(field.id);
737
	return isDefinitelyAssigned(field.id);
Lines 739-745 Link Here
739
739
740
final public boolean isDefinitelyAssigned(LocalVariableBinding local) {
740
final public boolean isDefinitelyAssigned(LocalVariableBinding local) {
741
	// do not want to complain in unreachable code if local declared in reachable code
741
	// do not want to complain in unreachable code if local declared in reachable code
742
	if ((this.tagBits & UNREACHABLE) != 0 && (local.declaration.bits & ASTNode.IsLocalDeclarationReachable) != 0) {
742
	if ((this.tagBits & UNREACHABLE_OR_DEAD) != 0 && (local.declaration.bits & ASTNode.IsLocalDeclarationReachable) != 0) {
743
		return true;
743
		return true;
744
	}
744
	}
745
	return isDefinitelyAssigned(local.id + this.maxFieldCount);
745
	return isDefinitelyAssigned(local.id + this.maxFieldCount);
Lines 1870-1876 Link Here
1870
				}
1870
				}
1871
			}
1871
			}
1872
		}
1872
		}
1873
		this.tagBits |= UNREACHABLE;
1873
		this.tagBits |= reachMode;
1874
	}
1874
	}
1875
	return this;
1875
	return this;
1876
}
1876
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/FlowAnalysisTest.java (-1 / +87 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2010 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 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 2246-2251 Link Here
2246
		"Dead code\n" + 
2246
		"Dead code\n" + 
2247
		"----------\n");
2247
		"----------\n");
2248
}
2248
}
2249
2250
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=338234
2251
// Warn uninitialized variable in deadcode if deadcode has been inferred
2252
// by null analysis
2253
public void testBug338234a() {
2254
	this.runNegativeTest(
2255
		new String[] {
2256
			"X.java",
2257
			"public class X {\n" +
2258
			"    public static void main(String[] args) {\n" + 
2259
			"        int i;\n" + 
2260
			"        String str = null;\n" + 
2261
			"        if (str != null)\n" + 
2262
			"            i++;    \n" + 
2263
			"    }\n" + 
2264
			"}\n"
2265
		},
2266
		"----------\n" + 
2267
		"1. WARNING in X.java (at line 6)\n" + 
2268
		"	i++;    \n" + 
2269
		"	^^^\n" + 
2270
		"Dead code\n" + 
2271
		"----------\n" + 
2272
		"2. ERROR in X.java (at line 6)\n" + 
2273
		"	i++;    \n" + 
2274
		"	^\n" + 
2275
		"The local variable i may not have been initialized\n" + 
2276
		"----------\n");
2277
}
2278
2279
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=338234
2280
// Don't warn uninitialized variable in deadcode if deadcode has not been inferred
2281
// by null analysis
2282
public void testBug338234b() {
2283
	this.runConformTest(
2284
		new String[] {
2285
			"X.java",
2286
			"public class X {\n" +
2287
			"    public static void main(String[] args) {\n" + 
2288
			"        int i;\n" + 
2289
			"        l: {\n" +
2290
			"			if(false)\n" +
2291
			"				break l;\n" + 
2292
			"        	return;\n" +
2293
			"		 }\n" + 
2294
			"        i++;    \n" + 
2295
			"    }\n" + 
2296
			"}\n"
2297
		},
2298
		"");
2299
}
2300
2301
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=338234
2302
// Warn uninitialized field in deadcode if deadcode has been inferred
2303
// by null analysis
2304
public void testBug338234c() {
2305
	this.runNegativeTest(
2306
		new String[] {
2307
			"X.java",
2308
			"public class X {\n" +
2309
			"    public final int field1;\n" +
2310
			"    {\n" + 
2311
			"        int i;\n" + 
2312
			"        String str = null;\n" +
2313
			"		 if(str != null)\n" +
2314
			"			i = field1;\n" + 
2315
			"    }\n" + 
2316
			"}\n"
2317
		},
2318
		"----------\n" + 
2319
		"1. ERROR in X.java (at line 1)\n" + 
2320
		"	public class X {\n" + 
2321
		"	             ^\n" + 
2322
		"The blank final field field1 may not have been initialized\n" + 
2323
		"----------\n" + 
2324
		"2. WARNING in X.java (at line 7)\n" + 
2325
		"	i = field1;\n" + 
2326
		"	^^^^^^^^^^\n" + 
2327
		"Dead code\n" + 
2328
		"----------\n" + 
2329
		"3. ERROR in X.java (at line 7)\n" + 
2330
		"	i = field1;\n" + 
2331
		"	    ^^^^^^\n" + 
2332
		"The blank final field field1 may not have been initialized\n" + 
2333
		"----------\n");
2334
}
2249
public static Class testClass() {
2335
public static Class testClass() {
2250
	return FlowAnalysisTest.class;
2336
	return FlowAnalysisTest.class;
2251
}
2337
}
(-)src/org/eclipse/jdt/core/tests/compiler/regression/NullReferenceTest.java (+34 lines)
Lines 14060-14063 Link Here
14060
		},
14060
		},
14061
		"");
14061
		"");
14062
}
14062
}
14063
14064
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=338234
14065
public void testBug338234() {
14066
	this.runNegativeTest(
14067
		new String[] {
14068
			"X.java",
14069
			"public class X {\n" + 
14070
			"   static int foo() {\n" + 
14071
			"        Object o = null;\n" +
14072
			"		 int i = 0;\n" + 
14073
			"        label: {\n" + 
14074
			"            if (o == null)\n" + 
14075
			"                break label;\n" +
14076
			"			 i++;" + 
14077
			"        }\n" + 
14078
			"         if (i != 0) {\n" + 
14079
			"            System.out.println(i);\n" + 
14080
			"        }\n" + 
14081
			"        return 0;\n" + 
14082
			"    }\n" + 
14083
			"}\n"
14084
		},
14085
		"----------\n" + 
14086
		"1. ERROR in X.java (at line 6)\n" + 
14087
		"	if (o == null)\n" + 
14088
		"	    ^\n" + 
14089
		"Redundant null check: The variable o can only be null at this location\n" + 
14090
		"----------\n" + 
14091
		"2. WARNING in X.java (at line 8)\n" + 
14092
		"	i++;        }\n" + 
14093
		"	^^^\n" + 
14094
		"Dead code\n" + 
14095
		"----------\n");
14096
}
14063
}
14097
}

Return to bug 338234