Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Silently return in case of CNFE. #1996

Merged
merged 1 commit into from
May 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/main/java/spoon/reflect/visitor/chain/CtQueryImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,10 @@ private static Class<?> detectTargetClassFromCCE(ClassCastException e, Object in
try {
return Class.forName(expectedClassName);
} catch (ClassNotFoundException e1) {
throw new SpoonException("The class detected from ClassCastException not found.", e1);
/*
* It wasn't able to load the expected class from the CCE.
* OK, so we cannot optimize next call and we have to let JVM to throw next CCE, but it is only performance problem. Not functional.
*/
}
}
}
Expand Down