Skip to content

Commit

Permalink
[WIP] address regression resulting in NPE
Browse files Browse the repository at this point in the history
Signed-off-by: David Thompson <[email protected]>
  • Loading branch information
datho7561 committed Apr 24, 2024
1 parent 21594e1 commit 43a949a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public boolean isSynthetic() {

@Override
public IJavaElement getJavaElement() {
IJavaElement parent = this.resolver.getBinding(this.methodSymbol.owner, null).getJavaElement();
IJavaElement parent = this.resolver.getBinding(this.methodSymbol.owner, this.methodType).getJavaElement();
if (parent instanceof IType type) {
return type.getMethod(this.methodSymbol.getSimpleName().toString(),
this.methodSymbol.params().stream()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ public ITypeBinding getGenericTypeOfWildcardType() {
}
if (this.typeSymbol.type instanceof WildcardType wildcardType) {
// TODO: probably wrong, we might need to pass in the parent node from the AST
return (ITypeBinding)this.resolver.getBinding(wildcardType.type.tsym, null);
return (ITypeBinding)this.resolver.getBinding(wildcardType.type.tsym, wildcardType.type);
}
throw new IllegalStateException("Binding is a wildcard, but type cast failed");
}
Expand Down Expand Up @@ -309,7 +309,7 @@ public IBinding getDeclaringMember() {
if (!this.isLocal()) {
return null;
}
return this.resolver.getBinding(this.typeSymbol.owner, null);
return this.resolver.getBinding(this.typeSymbol.owner, this.typeSymbol.owner.type);
}

@Override
Expand Down

0 comments on commit 43a949a

Please sign in to comment.