equal
deleted
inserted
replaced
755 actions); |
755 actions); |
756 sm.checkPermission(perm); |
756 sm.checkPermission(perm); |
757 } |
757 } |
758 } |
758 } |
759 |
759 |
760 private static void ensureClassAccess(Class clazz) |
760 private static void ensureClassAccess(Class<?> clazz) |
761 throws IllegalAccessException |
761 throws IllegalAccessException |
762 { |
762 { |
763 int mod = clazz.getModifiers(); |
763 int mod = clazz.getModifiers(); |
764 if (!Modifier.isPublic(mod)) { |
764 if (!Modifier.isPublic(mod)) { |
765 throw new IllegalAccessException("Class is not public and can't be instantiated"); |
765 throw new IllegalAccessException("Class is not public and can't be instantiated"); |