@Override public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
public void markFinallyNullStatus(LocalVariableBinding local, int nullStatus) { if (this.outerTryContext != null) { this.outerTryContext.markFinallyNullStatus(local, nullStatus); } super.markFinallyNullStatus(local, nullStatus); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(current.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(current.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(this.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(current.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(current.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(this.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(current.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
/** Mark that this resource is closed locally. */ public void markClose(FlowInfo flowInfo, FlowContext flowContext) { FakedTrackingVariable current = this; do { flowInfo.markAsDefinitelyNonNull(current.binding); current.globalClosingState |= CLOSE_SEEN; flowContext.markFinallyNullStatus(this.binding, FlowInfo.NON_NULL); current = current.innerTracker; } while (current != null); }
private void checkInternalNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, boolean checkString) { if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.LOCAL) { LocalVariableBinding local = (LocalVariableBinding) this.binding; if (local != null && (local.type.tagBits & TagBits.IsBaseType) == 0 && (checkString || local.type.id != TypeIds.T_JavaLangString)) { if ((this.bits & ASTNode.IsNonNull) == 0) { flowContext.recordUsingNullReference(scope, local, this, FlowContext.MAY_NULL, flowInfo); } flowInfo.markAsComparedEqualToNonNull(local); // from thereon it is set flowContext.markFinallyNullStatus(local, FlowInfo.NON_NULL); } } if (this.otherBindings != null) { if ((this.bits & ASTNode.RestrictiveFlagMASK) == Binding.FIELD) { // is the first field dereferenced annotated Nullable? If so, report immediately checkNullableFieldDereference(scope, (FieldBinding) this.binding, this.sourcePositions[this.indexOfFirstFieldBinding-1], flowContext, 0); } // look for annotated fields, they do not depend on flow context -> check immediately: int length = this.otherBindings.length - 1; // don't check the last binding for (int i = 0; i < length; i++) { checkNullableFieldDereference(scope, this.otherBindings[i], this.sourcePositions[this.indexOfFirstFieldBinding+i], flowContext, 0); } } }
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // record setting a variable: various scenarii are possible, setting an array reference, // a field reference, a blank final field reference, a field of an enclosing instance or // just a local variable. if (this.resolvedType.id != T_JavaLangString) { this.lhs.checkNPE(currentScope, flowContext, flowInfo); // account for exceptions thrown by any arithmetics: flowContext.recordAbruptExit(); } flowInfo = ((Reference) this.lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits(); if (this.resolvedType.id == T_JavaLangString) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=339250 LocalVariableBinding local = this.lhs.localVariableBinding(); if (local != null) { // compound assignment results in a definitely non null value for String flowInfo.markAsDefinitelyNonNull(local); flowContext.markFinallyNullStatus(local, FlowInfo.NON_NULL); } } return flowInfo; }
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // record setting a variable: various scenarii are possible, setting an array reference, // a field reference, a blank final field reference, a field of an enclosing instance or // just a local variable. if (this.resolvedType.id != T_JavaLangString) { this.lhs.checkNPE(currentScope, flowContext, flowInfo); // account for exceptions thrown by any arithmetics: flowContext.recordAbruptExit(); } flowInfo = ((Reference) this.lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits(); if (this.resolvedType.id == T_JavaLangString) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=339250 LocalVariableBinding local = this.lhs.localVariableBinding(); if (local != null) { // compound assignment results in a definitely non null value for String flowInfo.markAsDefinitelyNonNull(local); flowContext.markFinallyNullStatus(local, FlowInfo.NON_NULL); } } return flowInfo; }
public FlowInfo analyseCode(BlockScope currentScope, FlowContext flowContext, FlowInfo flowInfo) { // record setting a variable: various scenarii are possible, setting an array reference, // a field reference, a blank final field reference, a field of an enclosing instance or // just a local variable. if (this.resolvedType.id != T_JavaLangString) { this.lhs.checkNPE(currentScope, flowContext, flowInfo); // account for exceptions thrown by any arithmetics: flowContext.recordAbruptExit(); } flowInfo = ((Reference) this.lhs).analyseAssignment(currentScope, flowContext, flowInfo, this, true).unconditionalInits(); if (this.resolvedType.id == T_JavaLangString) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=339250 LocalVariableBinding local = this.lhs.localVariableBinding(); if (local != null) { // compound assignment results in a definitely non null value for String flowInfo.markAsDefinitelyNonNull(local); flowContext.markFinallyNullStatus(local, FlowInfo.NON_NULL); } } return flowInfo; }