public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) { // message send as a receiver if ((nullStatus(flowInfo, flowContext) & FlowInfo.POTENTIALLY_NULL) != 0) // note that flowInfo is not used inside nullStatus(..) scope.problemReporter().messageSendPotentialNullReference(this.binding, this); return true; // done all possible checking } /**
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) { // message send as a receiver if ((nullStatus(flowInfo, flowContext) & FlowInfo.POTENTIALLY_NULL) != 0) // note that flowInfo is not used inside nullStatus(..) scope.problemReporter().messageSendPotentialNullReference(this.binding, this); return true; // done all possible checking } /**
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) { // message send as a receiver if ((nullStatus(flowInfo, flowContext) & FlowInfo.POTENTIALLY_NULL) != 0) // note that flowInfo is not used inside nullStatus(..) scope.problemReporter().messageSendPotentialNullReference(this.binding, this); return true; // done all possible checking } /**
public void checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo) { super.checkNPE(scope, flowContext, flowInfo); if ((nullStatus(flowInfo) & FlowInfo.POTENTIALLY_NULL) != 0) scope.problemReporter().messageSendPotentialNullReference(this.binding, this); } /**
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) { // message send as a receiver int nullStatus = nullStatus(flowInfo, flowContext); // note that flowInfo is not used inside nullStatus(..) if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0) { if(this.binding.returnType.isTypeVariable() && nullStatus == FlowInfo.FREE_TYPEVARIABLE && scope.environment().globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled) { scope.problemReporter().methodReturnTypeFreeTypeVariableReference(this.binding, this); } else { scope.problemReporter().messageSendPotentialNullReference(this.binding, this); } } else if ((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) { NullAnnotationMatching nonNullStatus = NullAnnotationMatching.okNonNullStatus(this); if (nonNullStatus.wantToReport()) nonNullStatus.report(scope); } return true; // done all possible checking } /**
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) { // message send as a receiver int nullStatus = nullStatus(flowInfo, flowContext); // note that flowInfo is not used inside nullStatus(..) if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0) { if(this.binding.returnType.isTypeVariable() && nullStatus == FlowInfo.FREE_TYPEVARIABLE && scope.environment().globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled) { scope.problemReporter().methodReturnTypeFreeTypeVariableReference(this.binding, this); } else { scope.problemReporter().messageSendPotentialNullReference(this.binding, this); } } else if ((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) { NullAnnotationMatching nonNullStatus = NullAnnotationMatching.okNonNullStatus(this); if (nonNullStatus.wantToReport()) nonNullStatus.report(scope); } return true; // done all possible checking } /**
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) { // message send as a receiver int nullStatus = nullStatus(flowInfo, flowContext); // note that flowInfo is not used inside nullStatus(..) if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0) { if(this.binding.returnType.isTypeVariable() && nullStatus == FlowInfo.FREE_TYPEVARIABLE && scope.environment().globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled) { scope.problemReporter().methodReturnTypeFreeTypeVariableReference(this.binding, this); } else { scope.problemReporter().messageSendPotentialNullReference(this.binding, this); } } else if ((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) { NullAnnotationMatching nonNullStatus = NullAnnotationMatching.okNonNullStatus(this); if (nonNullStatus.wantToReport()) nonNullStatus.report(scope); } return true; // done all possible checking } /**
public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) { // message send as a receiver int nullStatus = nullStatus(flowInfo, flowContext); // note that flowInfo is not used inside nullStatus(..) if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0) { if(this.binding.returnType.isTypeVariable() && nullStatus == FlowInfo.FREE_TYPEVARIABLE && scope.environment().globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled) { scope.problemReporter().methodReturnTypeFreeTypeVariableReference(this.binding, this); } else { scope.problemReporter().messageSendPotentialNullReference(this.binding, this); } } else if ((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) { NullAnnotationMatching nonNullStatus = NullAnnotationMatching.okNonNullStatus(this); if (nonNullStatus.wantToReport()) nonNullStatus.report(scope); } return true; // done all possible checking } /**
@Override public boolean checkNPE(BlockScope scope, FlowContext flowContext, FlowInfo flowInfo, int ttlForFieldCheck) { // message send as a receiver int nullStatus = nullStatus(flowInfo, flowContext); // note that flowInfo is not used inside nullStatus(..) if ((nullStatus & FlowInfo.POTENTIALLY_NULL) != 0) { if(this.binding.returnType.isTypeVariable() && nullStatus == FlowInfo.FREE_TYPEVARIABLE && scope.environment().globalOptions.pessimisticNullAnalysisForFreeTypeVariablesEnabled) { scope.problemReporter().methodReturnTypeFreeTypeVariableReference(this.binding, this); } else { scope.problemReporter().messageSendPotentialNullReference(this.binding, this); } } else if ((this.resolvedType.tagBits & TagBits.AnnotationNonNull) != 0) { NullAnnotationMatching nonNullStatus = NullAnnotationMatching.okNonNullStatus(this); if (nonNullStatus.wantToReport()) nonNullStatus.report(scope); } return true; // done all possible checking } /**