8087350: Improve array conversions
Reviewed-by: dfuchs, ahgross
This commit is contained in:
parent
9fe659cafa
commit
17ac153c62
@ -761,11 +761,15 @@ public class OpenMBeanAttributeInfoSupport
|
||||
Class<?> stringArrayClass;
|
||||
Class<?> targetArrayClass;
|
||||
try {
|
||||
String baseClassName = baseType.safeGetClassName();
|
||||
|
||||
// check access to the provided base type class name and bail out early
|
||||
ReflectUtil.checkPackageAccess(baseClassName);
|
||||
|
||||
stringArrayClass =
|
||||
Class.forName(squareBrackets + "Ljava.lang.String;");
|
||||
targetArrayClass =
|
||||
Class.forName(squareBrackets + "L" + baseType.safeGetClassName() +
|
||||
";");
|
||||
Class.forName(squareBrackets + "L" + baseClassName + ";");
|
||||
} catch (ClassNotFoundException e) {
|
||||
throw new NoClassDefFoundError(e.toString()); // can't happen
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user