Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java')
-rw-r--r--org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
index f2eb5efa0e..a8f9b01261 100644
--- a/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
+++ b/org.eclipse.jdt.core/compiler/org/eclipse/jdt/internal/compiler/lookup/SourceTypeBinding.java
@@ -2268,6 +2268,27 @@ boolean hasNonNullDefaultFor(int location, int sourceStart) {
}
@Override
+protected boolean hasMethodWithNumArgs(char[] selector, int numArgs) {
+ if ((this.tagBits & TagBits.AreMethodsComplete) != 0)
+ return super.hasMethodWithNumArgs(selector, numArgs);
+ // otherwise don't trigger unResolvedMethods() which would actually resolve!
+ if (this.scope != null) {
+ for (AbstractMethodDeclaration method : this.scope.referenceContext.methods) {
+ if (CharOperation.equals(method.selector, TypeConstants.CLOSE)) {
+ if (numArgs == 0) {
+ if (method.arguments == null)
+ return true;
+ } else {
+ if (method.arguments != null && method.arguments.length == numArgs)
+ return true;
+ }
+ }
+ }
+ }
+ return false;
+}
+
+@Override
public AnnotationHolder retrieveAnnotationHolder(Binding binding, boolean forceInitialization) {
if (!isPrototype())
return this.prototype.retrieveAnnotationHolder(binding, forceInitialization);

Back to the top