private static boolean preventsUnlikelyTypeWarning(TypeBinding castedType, TypeBinding uncastedType, TypeBinding receiverType, MethodBinding binding, BlockScope scope) { if (!scope.compilerOptions().isAnyEnabled(IrritantSet.UNLIKELY_ARGUMENT_TYPE)) return false; if (binding.isStatic() || binding.parameters.length != 1) return false; // would using the uncastedType be considered as dangerous? UnlikelyArgumentCheck argumentChecks = UnlikelyArgumentCheck.determineCheckForNonStaticSingleArgumentMethod( uncastedType, scope, binding.selector, receiverType, binding.parameters); if (argumentChecks != null && argumentChecks.isDangerous(scope)) { // does the cast help? argumentChecks = UnlikelyArgumentCheck.determineCheckForNonStaticSingleArgumentMethod( castedType, scope, binding.selector, receiverType, binding.parameters); if (argumentChecks == null || !argumentChecks.isDangerous(scope)) return true; } return false; }
private static boolean preventsUnlikelyTypeWarning(TypeBinding castedType, TypeBinding uncastedType, TypeBinding receiverType, MethodBinding binding, BlockScope scope) { if (!scope.compilerOptions().isAnyEnabled(IrritantSet.UNLIKELY_ARGUMENT_TYPE)) return false; if (binding.isStatic() || binding.parameters.length != 1) return false; // would using the uncastedType be considered as dangerous? UnlikelyArgumentCheck argumentChecks = UnlikelyArgumentCheck.determineCheckForNonStaticSingleArgumentMethod( uncastedType, scope, binding.selector, receiverType, binding.parameters); if (argumentChecks != null && argumentChecks.isDangerous(scope)) { // does the cast help? argumentChecks = UnlikelyArgumentCheck.determineCheckForNonStaticSingleArgumentMethod( castedType, scope, binding.selector, receiverType, binding.parameters); if (argumentChecks == null || !argumentChecks.isDangerous(scope)) return true; } return false; }
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectevely enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectevely enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled if (tokenIrritants != null && options.isAnyEnabled(tokenIrritants) // if irritant is effectively enabled
if (currentScope.compilerOptions().isAnyEnabled(IrritantSet.UNLIKELY_ARGUMENT_TYPE) && this.binding.isValidBinding() && this.binding != null && this.binding.parameters != null) { if (this.binding.parameters.length == 1
if (currentScope.compilerOptions().isAnyEnabled(IrritantSet.UNLIKELY_ARGUMENT_TYPE) && this.binding.isValidBinding() && this.binding != null && this.binding.parameters != null) { if (this.binding.parameters.length == 1
if (compilerOptions.isAnyEnabled(IrritantSet.UNLIKELY_ARGUMENT_TYPE) && this.binding.isValidBinding() && this.arguments != null) { if (this.arguments.length == 1 && !this.binding.isStatic()) {
if (compilerOptions.isAnyEnabled(IrritantSet.UNLIKELY_ARGUMENT_TYPE) && this.binding.isValidBinding() && this.arguments != null) { if (this.arguments.length == 1 && !this.binding.isStatic()) {