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

Collapse All | Expand All

(-)compiler/org/eclipse/jdt/internal/compiler/ast/CompoundAssignment.java (-2 / +12 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 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 42-48 Link Here
42
	if (this.resolvedType.id != T_JavaLangString) {
42
	if (this.resolvedType.id != T_JavaLangString) {
43
		this.lhs.checkNPE(currentScope, flowContext, flowInfo);
43
		this.lhs.checkNPE(currentScope, flowContext, flowInfo);
44
	}
44
	}
45
	return  ((Reference) this.lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits();
45
	flowInfo = ((Reference) this.lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits();
46
	if (this.resolvedType.id == T_JavaLangString) {
47
		LocalVariableBinding local = this.lhs.localVariableBinding();
48
		if (local != null && this.resolvedType.id == T_JavaLangString) {
49
			// compound assignment results in a definitely non null value for String
50
			flowInfo.markAsDefinitelyNonNull(local);
51
			if (flowContext.initsOnFinally != null)
52
				flowContext.initsOnFinally.markAsDefinitelyNonNull(local);
53
		}
54
	}
55
	return flowInfo;
46
}
56
}
47
57
48
	public boolean checkCastCompatibility() {
58
	public boolean checkCastCompatibility() {

Return to bug 339250