Consistently handle NoClassDefFoundError in BeanUtils and related places

Issue: SPR-16369
This commit is contained in:
Juergen Hoeller
2018-01-17 20:24:57 +01:00
parent 0c289283ff
commit ea5f8f5a7c
7 changed files with 26 additions and 26 deletions

View File

@@ -298,11 +298,10 @@ public abstract class ClassUtils {
return forName(className, classLoader);
}
catch (ClassNotFoundException ex) {
throw new IllegalArgumentException("Cannot find class [" + className + "]", ex);
throw new IllegalArgumentException("Could not find class [" + className + "]", ex);
}
catch (LinkageError ex) {
throw new IllegalArgumentException(
"Error loading class [" + className + "]: problem with class file or dependent class.", ex);
catch (LinkageError err) {
throw new IllegalArgumentException("Unresolvable class definition for class [" + className + "]", err);
}
}