Skip to content

Commit

Permalink
Added handling of MethodAmbiguityException during type resolution
Browse files Browse the repository at this point in the history
Signed-off-by: Saurabh Sinha <[email protected]>
  • Loading branch information
sinha108 committed Jun 4, 2024
1 parent 26db1ea commit b7a59ee
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/com/ibm/northstar/SymbolTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import com.github.javaparser.ast.stmt.BlockStmt;
import com.github.javaparser.ast.type.ReferenceType;
import com.github.javaparser.ast.type.Type;
import com.github.javaparser.resolution.MethodAmbiguityException;
import com.github.javaparser.resolution.UnsolvedSymbolException;
import com.github.javaparser.resolution.types.ResolvedType;
import com.github.javaparser.symbolsolver.JavaSymbolSolver;
Expand Down Expand Up @@ -557,7 +558,7 @@ private static String resolveExpression(Expression expression) {
private static String resolveType(Type type) {
try {
return type.resolve().describe();
} catch (UnsolvedSymbolException | IllegalStateException e) {
} catch (UnsolvedSymbolException | IllegalStateException | MethodAmbiguityException e) {
Log.warn("Could not resolve "+type.asString()+": "+e.getMessage());
return type.asString();
}
Expand Down

0 comments on commit b7a59ee

Please sign in to comment.