public FlowInfo analyseAssignment(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo, Assignment assignment, boolean isCompound) {
// determine the rank until which we now we do not need any actual value for the field access
int otherBindingsCount = this.otherBindings == null ? 0 : this.otherBindings.length;
boolean needValue = otherBindingsCount == 0 || !this.otherBindings[0].isStatic();
boolean complyTo14 = currentScope.compilerOptions().complianceLevel >= ClassFileConstants.JDK1_4;
FieldBinding lastFieldBinding = null;
switch (this.bits & ASTNode.RestrictiveFlagMASK) {
case Binding.FIELD : // reading a field
lastFieldBinding = (FieldBinding) this.binding;
if (needValue || complyTo14) {
manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, 0, flowInfo);
}
// check if final blank field
if (lastFieldBinding.isBlankFinal()
&& this.otherBindings != null // the last field binding is only assigned
&& currentScope.needBlankFinalFieldInitializationCheck(lastFieldBinding)) {
FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(lastFieldBinding.declaringClass.original(), flowInfo);
if (!fieldInits.isDefinitelyAssigned(lastFieldBinding)) {
currentScope.problemReporter().uninitializedBlankFinalField(lastFieldBinding, this);
}
}
if (!lastFieldBinding.isStatic()) {
currentScope.resetEnclosingMethodStaticFlag();
}
break;
case Binding.LOCAL :
// first binding is a local variable
LocalVariableBinding localBinding;
if (!flowInfo
.isDefinitelyAssigned(localBinding = (LocalVariableBinding) this.binding)) {
currentScope.problemReporter().uninitializedLocalVariable(localBinding, this);
}
if ((flowInfo.tagBits & FlowInfo.UNREACHABLE) == 0) {
localBinding.useFlag = LocalVariableBinding.USED;
} else if (localBinding.useFlag == LocalVariableBinding.UNUSED) {
localBinding.useFlag = LocalVariableBinding.FAKE_USED;
}
if (needValue) {
checkNPE(currentScope, flowContext, flowInfo, true);
}
}
if (needValue) {
manageEnclosingInstanceAccessIfNecessary(currentScope, flowInfo);
// only for first binding
}
// all intermediate field accesses are read accesses
if (this.otherBindings != null) {
for (int i = 0; i < otherBindingsCount-1; i++) {
lastFieldBinding = this.otherBindings[i];
needValue = !this.otherBindings[i+1].isStatic();
if (needValue || complyTo14) {
manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, i + 1, flowInfo);
}
}
lastFieldBinding = this.otherBindings[otherBindingsCount-1];
}
if (isCompound) {
if (otherBindingsCount == 0
&& lastFieldBinding.isBlankFinal()
&& currentScope.needBlankFinalFieldInitializationCheck(lastFieldBinding)) {
FlowInfo fieldInits = flowContext.getInitsForFinalBlankInitializationCheck(lastFieldBinding.declaringClass, flowInfo);
if (!fieldInits.isDefinitelyAssigned(lastFieldBinding)) {
currentScope.problemReporter().uninitializedBlankFinalField(lastFieldBinding, this);
}
}
manageSyntheticAccessIfNecessary(currentScope, lastFieldBinding, otherBindingsCount, flowInfo);
}
if (assignment.expression != null) {
flowInfo =
assignment
.expression
.analyseCode(currentScope, flowContext, flowInfo)
.unconditionalInits();
}
// the last field access is a write access
if (lastFieldBinding.isFinal()) {
// in a context where it can be assigned?
if (otherBindingsCount == 0
&& this.indexOfFirstFieldBinding == 1
&& lastFieldBinding.isBlankFinal()
&& !isCompound
&& currentScope.allowBlankFinalFieldAssignment(lastFieldBinding)) {
if (flowInfo.isPotentiallyAssigned(lastFieldBinding)) {
currentScope.problemReporter().duplicateInitializationOfBlankFinalField(lastFieldBinding, this);
} else {