nashorn/src/jdk/internal/dynalink/beans/StaticClassLinker.java
changeset 19093 49bb7e75b326
parent 18876 ada98218aaae
child 19455 b972b61a6921
equal deleted inserted replaced
19092:e23f2618ffde 19093:49bb7e75b326
   130             if(clazz.isArray()) {
   130             if(clazz.isArray()) {
   131                 final MethodHandle boundArrayCtor = ARRAY_CTOR.bindTo(clazz.getComponentType());
   131                 final MethodHandle boundArrayCtor = ARRAY_CTOR.bindTo(clazz.getComponentType());
   132                 return new SimpleDynamicMethod(StaticClassIntrospector.editConstructorMethodHandle(
   132                 return new SimpleDynamicMethod(StaticClassIntrospector.editConstructorMethodHandle(
   133                         boundArrayCtor.asType(boundArrayCtor.type().changeReturnType(clazz))), clazz, "<init>");
   133                         boundArrayCtor.asType(boundArrayCtor.type().changeReturnType(clazz))), clazz, "<init>");
   134             }
   134             }
   135 
   135             if(CheckRestrictedPackage.isRestrictedClass(clazz)) {
       
   136                 return null;
       
   137             }
   136             return createDynamicMethod(Arrays.asList(clazz.getConstructors()), clazz, "<init>");
   138             return createDynamicMethod(Arrays.asList(clazz.getConstructors()), clazz, "<init>");
   137         }
   139         }
   138 
   140 
   139         @Override
   141         @Override
   140         FacetIntrospector createFacetIntrospector() {
   142         FacetIntrospector createFacetIntrospector() {