jdk/src/java.base/share/classes/java/lang/SecurityManager.java
changeset 44545 83b611b88ac8
parent 43712 5dfd0950317c
child 45004 ea3137042a61
equal deleted inserted replaced
44480:2c33418a6d57 44545:83b611b88ac8
    27 
    27 
    28 import java.lang.RuntimePermission;
    28 import java.lang.RuntimePermission;
    29 import java.lang.module.ModuleDescriptor;
    29 import java.lang.module.ModuleDescriptor;
    30 import java.lang.module.ModuleDescriptor.Exports;
    30 import java.lang.module.ModuleDescriptor.Exports;
    31 import java.lang.module.ModuleDescriptor.Opens;
    31 import java.lang.module.ModuleDescriptor.Opens;
    32 import java.lang.reflect.Layer;
       
    33 import java.lang.reflect.Member;
    32 import java.lang.reflect.Member;
    34 import java.lang.reflect.Module;
       
    35 import java.io.FileDescriptor;
    33 import java.io.FileDescriptor;
    36 import java.io.File;
    34 import java.io.File;
    37 import java.io.FilePermission;
    35 import java.io.FilePermission;
    38 import java.net.InetAddress;
    36 import java.net.InetAddress;
    39 import java.net.SocketPermission;
    37 import java.net.SocketPermission;
  1439     // module or is exported in a qualified fashion by its containing module.
  1437     // module or is exported in a qualified fashion by its containing module.
  1440     private static final Set<String> nonExportedPkgs;
  1438     private static final Set<String> nonExportedPkgs;
  1441 
  1439 
  1442     static {
  1440     static {
  1443         // Get the modules in the boot layer
  1441         // Get the modules in the boot layer
  1444         Stream<Module> bootLayerModules = Layer.boot().modules().stream();
  1442         Stream<Module> bootLayerModules = ModuleLayer.boot().modules().stream();
  1445 
  1443 
  1446         // Filter out the modules loaded by the boot or platform loader
  1444         // Filter out the modules loaded by the boot or platform loader
  1447         PrivilegedAction<Set<Module>> pa = () ->
  1445         PrivilegedAction<Set<Module>> pa = () ->
  1448             bootLayerModules.filter(SecurityManager::isBootOrPlatformModule)
  1446             bootLayerModules.filter(SecurityManager::isBootOrPlatformModule)
  1449                             .collect(Collectors.toSet());
  1447                             .collect(Collectors.toSet());