Skip to content

Commit

Permalink
Do not crash on non-convertible type
Browse files Browse the repository at this point in the history
Log instead
  • Loading branch information
mickaelistria committed Sep 24, 2024
1 parent 1a095c1 commit a63e048
Showing 1 changed file with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3057,13 +3057,15 @@ Type convertToType(JCTree javac) {
res.setFlags(ASTNode.RECOVERED);
return res;
}
throw new UnsupportedOperationException("Not supported yet, type " + javac + " of class" + javac.getClass());
ILog.get().warn("Not supported yet, converting to type type " + javac + " of class" + javac.getClass());
return null;
}
public static int ordinalIndexOf(String str, String substr, int n) {
int pos = str.indexOf(substr);
while (--n > 0 && pos != -1)
pos = str.indexOf(substr, pos + 1);
return pos;
int pos = str.indexOf(substr);
while (--n > 0 && pos != -1) {
pos = str.indexOf(substr, pos + 1);
}
return pos;
}
private Code convert(TypeKind javac) {
return switch(javac) {
Expand Down

0 comments on commit a63e048

Please sign in to comment.