< prev index next >

src/java.base/share/classes/sun/invoke/util/VerifyAccess.java

Print this page
rev 50983 : 8207027: Lookup.accessClass fails for an array type in the same package when assertions are enabled
Reviewed-by:

@@ -331,11 +331,10 @@
      * @param class1 a class
      * @param class2 another class
      * @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())
             return false;
         return Objects.equals(class1.getPackageName(), class2.getPackageName());
< prev index next >