8207027: Lookup.accessClass fails for an array type in the same package when assertions are enabled

Reviewed-by: redestad, mchung
This commit is contained in:
Paul Sandoz 2018-07-11 15:35:47 -07:00
parent 8a9b0134a8
commit d808684592
3 changed files with 18 additions and 5 deletions

View file

@ -333,7 +333,6 @@ public class VerifyAccess {
* @return whether they are in the same package
*/
public static boolean isSamePackage(Class<?> class1, Class<?> class2) {
assert(!class1.isArray() && !class2.isArray());
if (class1 == class2)
return true;
if (class1.getClassLoader() != class2.getClassLoader())