private MethodBinding findCloseMethod(final LocalDeclaration resource, LocalVariableBinding resourceBinding) { MethodBinding closeMethod = null; TypeBinding type = resourceBinding.type; if (type != null && type.isValidBinding()) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {
private MethodBinding findCloseMethod(final LocalDeclaration resource, LocalVariableBinding resourceBinding) { MethodBinding closeMethod = null; TypeBinding type = resourceBinding.type; if (type != null && type.isValidBinding()) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {
private MethodBinding findCloseMethod(final LocalDeclaration resource, LocalVariableBinding resourceBinding) { MethodBinding closeMethod = null; TypeBinding type = resourceBinding.type; if (type != null && type.isValidBinding()) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {
private MethodBinding findCloseMethod(final LocalDeclaration resource, LocalVariableBinding resourceBinding) { MethodBinding closeMethod = null; TypeBinding type = resourceBinding.type; if (type != null && type.isValidBinding()) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {
private MethodBinding findCloseMethod(final LocalDeclaration resource, LocalVariableBinding resourceBinding) { MethodBinding closeMethod = null; TypeBinding type = resourceBinding.type; if (type != null && type.isValidBinding()) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {
private MethodBinding findCloseMethod(final ASTNode resource, TypeBinding type) { MethodBinding closeMethod = null; if (type != null && type.isValidBinding() && type instanceof ReferenceBinding) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {
private MethodBinding findCloseMethod(final LocalDeclaration resource, LocalVariableBinding resourceBinding) { MethodBinding closeMethod = null; TypeBinding type = resourceBinding.type; if (type != null && type.isValidBinding()) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {
private MethodBinding findCloseMethod(final ASTNode resource, TypeBinding type) { MethodBinding closeMethod = null; if (type != null && type.isValidBinding() && type instanceof ReferenceBinding) { ReferenceBinding binding = (ReferenceBinding) type; closeMethod = binding.getExactMethod(ConstantPool.Close, new TypeBinding [0], this.scope.compilationUnitScope()); // scope needs to be tighter if(closeMethod == null) { // https://bugs.eclipse.org/bugs/show_bug.cgi?id=380112 // closeMethod could be null if the binding is from an interface // extending from multiple interfaces. InvocationSite site = new InvocationSite.EmptyWithAstNode(resource); closeMethod = this.scope.compilationUnitScope().findMethod(binding, ConstantPool.Close, new TypeBinding[0], site, false); } } return closeMethod; } private FlowInfo prepareCatchInfo(FlowInfo flowInfo, ExceptionHandlingFlowContext handlingContext, FlowInfo tryInfo, int i) {