Fix typo in ClassUtils.forName()
See gh-31258 Closes gh-31428
This commit is contained in:
@@ -306,7 +306,7 @@ public abstract class ClassUtils {
|
||||
catch (ClassNotFoundException ex) {
|
||||
int lastDotIndex = name.lastIndexOf(PACKAGE_SEPARATOR);
|
||||
int previousDotIndex = name.lastIndexOf(PACKAGE_SEPARATOR, lastDotIndex -1);
|
||||
if (lastDotIndex != -1 && previousDotIndex != 1 && Character.isUpperCase(name.charAt(previousDotIndex + 1))) {
|
||||
if (lastDotIndex != -1 && previousDotIndex != -1 && Character.isUpperCase(name.charAt(previousDotIndex + 1))) {
|
||||
String nestedClassName =
|
||||
name.substring(0, lastDotIndex) + NESTED_CLASS_SEPARATOR + name.substring(lastDotIndex + 1);
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user