LuciferYang commented on code in PR #259:
URL: https://github.com/apache/commons-crypto/pull/259#discussion_r1368085841
##########
src/main/java/org/apache/commons/crypto/utils/ReflectionUtils.java:
##########
@@ -63,6 +68,9 @@ private static abstract class AbstractNegativeCacheSentinel {
public static Class<?> getClassByName(final String name) throws
ClassNotFoundException {
final Class<?> ret = getClassByNameOrNull(name);
if (ret == null) {
+ if (INIT_ERROR_CLASSES.get(CLASSLOADER).contains(name)) {
+ throw new IllegalStateException("Class " + name + "
initialization error");
Review Comment:
An additional judgment has been added to distinguish ClassNotFoundException.
Here an `IllegalStateException` is manually thrown, there may be a more
appropriate exception type.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]