From 81752c4bcc384a8dd1e87b71a0de86877a0b661d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20Gr=C3=B6nlund?= Date: Tue, 12 Nov 2024 15:45:23 +0000 Subject: [PATCH 01/53] 8338565: Test crashed: assert(is_path_empty()) failed: invariant Reviewed-by: egahlin --- src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp b/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp index 0759d02cb7c23..eaee79497bb4d 100644 --- a/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp +++ b/src/hotspot/share/jfr/recorder/repository/jfrEmergencyDump.cpp @@ -109,8 +109,6 @@ static void close_emergency_dump_file() { } static const char* create_emergency_dump_path() { - assert(is_path_empty(), "invariant"); - const size_t path_len = get_dump_directory(); if (path_len == 0) { return nullptr; From c12b386d1916af9a04b4c6698838c2b40c6cdd86 Mon Sep 17 00:00:00 2001 From: Tom Rodriguez Date: Tue, 12 Nov 2024 15:52:30 +0000 Subject: [PATCH 02/53] 8338007: [JVMCI] ResolvedJavaMethod.reprofile can crash ciMethodData Reviewed-by: dnsimon, kvn --- src/hotspot/share/jvmci/jvmciCompilerToVM.cpp | 3 +- src/hotspot/share/oops/methodData.cpp | 33 +++++++++++++++++-- src/hotspot/share/oops/methodData.hpp | 10 +++++- src/hotspot/share/runtime/vmOperation.hpp | 3 +- 4 files changed, 43 insertions(+), 6 deletions(-) diff --git a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp index 7922a6816393b..b85d2227fc7f5 100644 --- a/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp +++ b/src/hotspot/share/jvmci/jvmciCompilerToVM.cpp @@ -1382,7 +1382,8 @@ C2V_VMENTRY(void, reprofile, (JNIEnv* env, jobject, ARGUMENT_PAIR(method))) if (method_data == nullptr) { method_data = get_profiling_method_data(method, CHECK); } else { - method_data->initialize(); + CompilerThreadCanCallJava canCallJava(THREAD, true); + method_data->reinitialize(); } C2V_END diff --git a/src/hotspot/share/oops/methodData.cpp b/src/hotspot/share/oops/methodData.cpp index af19d59f28123..bc2649ba0ed3e 100644 --- a/src/hotspot/share/oops/methodData.cpp +++ b/src/hotspot/share/oops/methodData.cpp @@ -59,9 +59,14 @@ bool DataLayout::needs_array_len(u1 tag) { // Perform generic initialization of the data. More specific // initialization occurs in overrides of ProfileData::post_initialize. void DataLayout::initialize(u1 tag, u2 bci, int cell_count) { - _header._bits = (intptr_t)0; - _header._struct._tag = tag; - _header._struct._bci = bci; + DataLayout temp; + temp._header._bits = (intptr_t)0; + temp._header._struct._tag = tag; + temp._header._struct._bci = bci; + // Write the header using a single intptr_t write. This ensures that if the layout is + // reinitialized readers will never see the transient state where the header is 0. + _header = temp._header; + for (int i = 0; i < cell_count; i++) { set_cell_at(i, (intptr_t)0); } @@ -1224,6 +1229,28 @@ MethodData::MethodData(const methodHandle& method) initialize(); } +// Reinitialize the storage of an existing MDO at a safepoint. Doing it this way will ensure it's +// not being accessed while the contents are being rewritten. +class VM_ReinitializeMDO: public VM_Operation { + private: + MethodData* _mdo; + public: + VM_ReinitializeMDO(MethodData* mdo): _mdo(mdo) {} + VMOp_Type type() const { return VMOp_ReinitializeMDO; } + void doit() { + // The extra data is being zero'd, we'd like to acquire the extra_data_lock but it can't be held + // over a safepoint. This means that we don't actually need to acquire the lock. + _mdo->initialize(); + } + bool allow_nested_vm_operations() const { return true; } +}; + +void MethodData::reinitialize() { + VM_ReinitializeMDO op(this); + VMThread::execute(&op); +} + + void MethodData::initialize() { Thread* thread = Thread::current(); NoSafepointVerifier no_safepoint; // init function atomic wrt GC diff --git a/src/hotspot/share/oops/methodData.hpp b/src/hotspot/share/oops/methodData.hpp index 5071c29f1d774..36fcf8ce5fd60 100644 --- a/src/hotspot/share/oops/methodData.hpp +++ b/src/hotspot/share/oops/methodData.hpp @@ -1949,6 +1949,7 @@ class MethodData : public Metadata { friend class ProfileData; friend class TypeEntriesAtCall; friend class ciMethodData; + friend class VM_ReinitializeMDO; // If you add a new field that points to any metaspace object, you // must add this field to MethodData::metaspace_pointers_do(). @@ -1965,11 +1966,18 @@ class MethodData : public Metadata { Mutex _extra_data_lock; MethodData(const methodHandle& method); + + void initialize(); + public: static MethodData* allocate(ClassLoaderData* loader_data, const methodHandle& method, TRAPS); virtual bool is_methodData() const { return true; } - void initialize(); + + // Safely reinitialize the data in the MDO. This is intended as a testing facility as the + // reinitialization is performed at a safepoint so it's isn't cheap and it doesn't ensure that all + // readers will see consistent profile data. + void reinitialize(); // Whole-method sticky bits and flags enum { diff --git a/src/hotspot/share/runtime/vmOperation.hpp b/src/hotspot/share/runtime/vmOperation.hpp index eede52f00d566..50d859444858d 100644 --- a/src/hotspot/share/runtime/vmOperation.hpp +++ b/src/hotspot/share/runtime/vmOperation.hpp @@ -114,7 +114,8 @@ template(GTestStopSafepoint) \ template(JFROldObject) \ template(JvmtiPostObjectFree) \ - template(RendezvousGCThreads) + template(RendezvousGCThreads) \ + template(ReinitializeMDO) class Thread; class outputStream; From db85090553ab14a84c3ed0a2604dd56c5b6e6982 Mon Sep 17 00:00:00 2001 From: Sean Mullan Date: Tue, 12 Nov 2024 17:16:15 +0000 Subject: [PATCH 03/53] 8338411: Implement JEP 486: Permanently Disable the Security Manager Co-authored-by: Sean Mullan Co-authored-by: Alan Bateman Co-authored-by: Weijun Wang Co-authored-by: Aleksei Efimov Co-authored-by: Brian Burkhalter Co-authored-by: Daniel Fuchs Co-authored-by: Harshitha Onkar Co-authored-by: Joe Wang Co-authored-by: Jorn Vernee Co-authored-by: Justin Lu Co-authored-by: Kevin Walls Co-authored-by: Lance Andersen Co-authored-by: Naoto Sato Co-authored-by: Roger Riggs Co-authored-by: Brent Christian Co-authored-by: Stuart Marks Co-authored-by: Ian Graves Co-authored-by: Phil Race Co-authored-by: Erik Gahlin Co-authored-by: Jaikiran Pai Reviewed-by: kevinw, aivanov, rriggs, lancea, coffeys, dfuchs, ihse, erikj, cjplummer, coleenp, naoto, mchung, prr, weijun, joehw, azvegint, psadhukhan, bchristi, sundar, attila --- make/modules/java.base/Copy.gmk | 40 - make/modules/java.rmi/Launcher.gmk | 1 - src/hotspot/share/classfile/dictionary.cpp | 62 - src/hotspot/share/classfile/javaClasses.cpp | 27 +- src/hotspot/share/classfile/javaClasses.hpp | 3 - src/hotspot/share/classfile/vmSymbols.hpp | 2 - src/hotspot/share/include/jvm.h | 10 - src/hotspot/share/prims/jvm.cpp | 81 - src/hotspot/share/runtime/globals.hpp | 3 - src/java.base/share/classes/java/io/File.java | 204 -- .../classes/java/io/FileInputStream.java | 26 - .../classes/java/io/FileOutputStream.java | 40 - .../share/classes/java/io/FilePermission.java | 38 +- .../classes/java/io/ObjectInputFilter.java | 4 - .../classes/java/io/ObjectInputStream.java | 45 +- .../classes/java/io/ObjectOutputStream.java | 43 +- .../share/classes/java/io/PrintStream.java | 28 - .../share/classes/java/io/PrintWriter.java | 28 - .../classes/java/io/RandomAccessFile.java | 29 - .../java/io/SerializablePermission.java | 55 +- .../share/classes/java/lang/Boolean.java | 2 - .../share/classes/java/lang/Class.java | 389 +-- .../share/classes/java/lang/ClassLoader.java | 128 +- .../share/classes/java/lang/Integer.java | 6 - .../share/classes/java/lang/Long.java | 6 - .../share/classes/java/lang/Module.java | 13 +- .../share/classes/java/lang/ModuleLayer.java | 38 - .../share/classes/java/lang/Process.java | 9 +- .../classes/java/lang/ProcessBuilder.java | 66 +- .../classes/java/lang/ProcessHandle.java | 18 +- .../share/classes/java/lang/Runtime.java | 83 +- .../classes/java/lang/RuntimePermission.java | 357 +-- .../classes/java/lang/SecurityException.java | 9 +- .../classes/java/lang/SecurityManager.java | 1450 ++--------- .../share/classes/java/lang/StackWalker.java | 28 - .../share/classes/java/lang/System.java | 399 +-- .../share/classes/java/lang/Thread.java | 244 +- .../share/classes/java/lang/ThreadGroup.java | 109 +- .../classes/java/lang/VirtualThread.java | 2 - .../java/lang/invoke/LambdaMetafactory.java | 8 +- .../java/lang/invoke/MethodHandleProxies.java | 5 - .../java/lang/invoke/MethodHandles.java | 128 +- .../classes/java/lang/invoke/MethodType.java | 3 - .../java/lang/module/Configuration.java | 11 +- .../java/lang/module/ModuleFinder.java | 17 +- .../java/lang/module/ModuleReader.java | 19 +- .../java/lang/module/ModuleReference.java | 10 +- .../share/classes/java/lang/package-info.java | 10 +- .../share/classes/java/lang/ref/Cleaner.java | 10 +- .../java/lang/reflect/AccessibleObject.java | 25 +- .../java/lang/reflect/Constructor.java | 6 +- .../classes/java/lang/reflect/Field.java | 1 - .../classes/java/lang/reflect/Method.java | 1 - .../classes/java/lang/reflect/Proxy.java | 48 +- .../java/lang/reflect/ReflectPermission.java | 46 +- .../java/lang/reflect/package-info.java | 5 +- .../share/classes/java/net/Authenticator.java | 79 +- .../classes/java/net/ContentHandler.java | 6 +- .../share/classes/java/net/CookieHandler.java | 8 +- .../classes/java/net/DatagramSocket.java | 129 +- .../classes/java/net/HttpURLConnection.java | 24 - .../share/classes/java/net/InetAddress.java | 76 +- .../classes/java/net/InetSocketAddress.java | 9 +- .../classes/java/net/MulticastSocket.java | 58 - .../share/classes/java/net/NetPermission.java | 155 +- .../classes/java/net/NetworkInterface.java | 25 +- .../share/classes/java/net/ProxySelector.java | 9 +- .../share/classes/java/net/ResponseCache.java | 10 +- .../share/classes/java/net/ServerSocket.java | 104 +- .../share/classes/java/net/Socket.java | 106 +- .../classes/java/net/SocketPermission.java | 26 +- src/java.base/share/classes/java/net/URL.java | 35 +- .../classes/java/net/URLClassLoader.java | 68 +- .../share/classes/java/net/URLConnection.java | 18 +- .../share/classes/java/net/URLPermission.java | 13 +- .../net/spi/InetAddressResolverProvider.java | 5 +- .../net/spi/URLStreamHandlerProvider.java | 6 +- .../nio/channels/AsynchronousFileChannel.java | 16 - .../AsynchronousServerSocketChannel.java | 27 +- .../channels/AsynchronousSocketChannel.java | 33 +- .../java/nio/channels/DatagramChannel.java | 83 +- .../java/nio/channels/FileChannel.java | 16 - .../java/nio/channels/MulticastChannel.java | 10 +- .../java/nio/channels/NetworkChannel.java | 6 +- .../nio/channels/ServerSocketChannel.java | 50 +- .../java/nio/channels/SocketChannel.java | 50 +- .../spi/AsynchronousChannelProvider.java | 15 +- .../nio/channels/spi/SelectorProvider.java | 20 +- .../java/nio/charset/spi/CharsetProvider.java | 14 - .../java/nio/file/AccessDeniedException.java | 7 +- .../classes/java/nio/file/FileSystem.java | 27 +- .../classes/java/nio/file/FileSystems.java | 28 +- .../share/classes/java/nio/file/Files.java | 385 +-- .../classes/java/nio/file/LinkPermission.java | 38 +- .../share/classes/java/nio/file/Path.java | 31 +- .../share/classes/java/nio/file/Paths.java | 5 +- .../java/nio/file/SecureDirectoryStream.java | 31 +- .../classes/java/nio/file/Watchable.java | 10 +- .../file/attribute/AclFileAttributeView.java | 12 +- .../attribute/BasicFileAttributeView.java | 10 +- .../file/attribute/DosFileAttributeView.java | 19 +- .../attribute/FileOwnerAttributeView.java | 14 +- .../attribute/PosixFileAttributeView.java | 20 +- .../UserDefinedFileAttributeView.java | 38 +- .../attribute/UserPrincipalLookupService.java | 10 +- .../java/nio/file/spi/FileSystemProvider.java | 166 +- .../java/nio/file/spi/FileTypeDetector.java | 23 +- .../java/security/AccessControlContext.java | 740 +----- .../java/security/AccessControlException.java | 22 +- .../java/security/AccessController.java | 1040 ++------ .../classes/java/security/AllPermission.java | 18 +- .../classes/java/security/AuthProvider.java | 17 +- .../classes/java/security/DomainCombiner.java | 62 +- .../share/classes/java/security/Identity.java | 59 +- .../classes/java/security/IdentityScope.java | 12 +- .../share/classes/java/security/KeyStore.java | 20 +- .../classes/java/security/Permission.java | 27 +- .../share/classes/java/security/Policy.java | 506 +--- .../classes/java/security/PolicySpi.java | 61 +- .../java/security/ProtectionDomain.java | 320 +-- .../share/classes/java/security/Provider.java | 153 -- .../java/security/SecureClassLoader.java | 32 +- .../share/classes/java/security/Security.java | 83 - .../java/security/SecurityPermission.java | 291 +-- .../share/classes/java/security/Signer.java | 21 +- .../java/security/UnresolvedPermission.java | 61 +- .../classes/java/security/package-info.java | 8 - .../share/classes/java/util/Formatter.java | 40 - .../share/classes/java/util/Locale.java | 17 - .../classes/java/util/PropertyPermission.java | 29 +- .../classes/java/util/ResourceBundle.java | 10 - .../classes/java/util/ServiceLoader.java | 11 +- .../share/classes/java/util/TimeZone.java | 4 - .../java/util/concurrent/ExecutorService.java | 22 - .../java/util/concurrent/Executors.java | 97 +- .../java/util/concurrent/ForkJoinPool.java | 41 - .../util/concurrent/ForkJoinWorkerThread.java | 36 +- .../ScheduledThreadPoolExecutor.java | 3 - .../util/concurrent/ThreadLocalRandom.java | 7 - .../util/concurrent/ThreadPoolExecutor.java | 4 - .../share/classes/java/util/jar/JarFile.java | 12 - .../java/util/spi/LocaleServiceProvider.java | 4 - .../share/classes/java/util/zip/ZipFile.java | 39 - .../javax/net/ServerSocketFactory.java | 26 +- .../classes/javax/net/SocketFactory.java | 28 - .../javax/net/ssl/HttpsURLConnection.java | 11 +- .../classes/javax/net/ssl/SSLContext.java | 5 +- .../classes/javax/net/ssl/SSLPermission.java | 56 +- .../javax/net/ssl/SSLServerSocket.java | 26 +- .../classes/javax/net/ssl/SSLSession.java | 13 +- .../classes/javax/net/ssl/SSLSocket.java | 28 - .../javax/security/auth/AuthPermission.java | 98 +- .../javax/security/auth/Destroyable.java | 5 +- .../auth/PrivateCredentialPermission.java | 58 +- .../javax/security/auth/Refreshable.java | 6 +- .../classes/javax/security/auth/Subject.java | 503 +--- .../security/auth/SubjectDomainCombiner.java | 18 +- .../security/auth/login/Configuration.java | 20 +- .../security/auth/login/ConfigurationSpi.java | 5 +- .../security/auth/login/LoginContext.java | 67 +- .../jdk/internal/access/JavaLangAccess.java | 16 - .../internal/access/JavaSecurityAccess.java | 16 +- .../jdk/internal/misc/CarrierThread.java | 18 - .../jdk/internal/misc/InnocuousThread.java | 11 +- .../classes/jdk/internal/module/Modules.java | 5 +- src/java.base/share/classes/module-info.java | 1 - .../sun/security/provider/PolicyFile.java | 2250 ----------------- .../sun/security/provider/PolicyParser.java | 839 +----- .../sun/security/provider/PolicySpiFile.java | 82 - .../sun/security/provider/SunEntries.java | 9 +- .../classes/sun/security/util/Debug.java | 18 - .../classes/sun/security/util/Resources.java | 37 +- src/java.base/share/conf/security/java.policy | 46 - .../share/conf/security/java.security | 62 +- .../share/lib/security/default.policy | 210 -- .../share/native/libjava/AccessController.c | 70 - .../share/native/libjava/SecurityManager.c | 78 - .../windows/lib/security/default.policy | 16 - .../share/classes/javax/tools/FileObject.java | 5 +- .../tools/ForwardingJavaFileManager.java | 1 - .../classes/javax/tools/JavaFileManager.java | 4 - .../classes/javax/tools/JavaFileObject.java | 5 +- .../share/classes/java/applet/Applet.java | 7 +- .../share/classes/java/awt/AWTPermission.java | 132 +- .../share/classes/java/awt/Desktop.java | 108 +- .../share/classes/java/awt/Dialog.java | 22 +- .../share/classes/java/awt/Font.java | 10 +- .../share/classes/java/awt/Graphics2D.java | 14 - .../classes/java/awt/GraphicsDevice.java | 8 +- .../java/awt/KeyboardFocusManager.java | 106 +- .../share/classes/java/awt/MouseInfo.java | 12 +- .../share/classes/java/awt/Robot.java | 21 +- .../share/classes/java/awt/SystemTray.java | 11 +- .../share/classes/java/awt/Taskbar.java | 24 +- .../share/classes/java/awt/Toolkit.java | 121 +- .../share/classes/java/awt/TrayIcon.java | 19 +- .../share/classes/java/awt/Window.java | 46 +- .../classes/java/awt/color/ICC_Profile.java | 2 - .../java/awt/doc-files/AWTThreadIssues.html | 3 +- .../classes/java/awt/print/PrinterJob.java | 8 +- .../share/classes/java/beans/Beans.java | 26 +- .../share/classes/java/beans/Expression.java | 4 +- .../classes/java/beans/Introspector.java | 9 +- .../java/beans/PropertyEditorManager.java | 17 +- .../share/classes/java/beans/Statement.java | 4 +- .../accessibility/AccessibilityProvider.java | 5 +- .../share/classes/javax/imageio/ImageIO.java | 4 +- .../imageio/stream/FileImageInputStream.java | 4 +- .../imageio/stream/FileImageOutputStream.java | 4 +- .../javax/print/PrintServiceLookup.java | 15 +- .../classes/javax/sound/midi/MidiDevice.java | 4 +- .../javax/sound/sampled/AudioPermission.java | 42 +- .../javax/sound/sampled/AudioSystem.java | 20 +- .../classes/javax/sound/sampled/Clip.java | 6 +- .../classes/javax/sound/sampled/Line.java | 10 +- .../classes/javax/sound/sampled/Mixer.java | 8 +- .../javax/sound/sampled/SourceDataLine.java | 6 +- .../javax/sound/sampled/TargetDataLine.java | 6 +- .../classes/javax/swing/FocusManager.java | 16 +- .../share/classes/javax/swing/JDialog.java | 11 +- .../share/classes/javax/swing/JFrame.java | 6 +- .../share/classes/javax/swing/JTable.java | 11 - .../share/classes/javax/swing/UIManager.java | 6 +- .../classes/javax/swing/WindowConstants.java | 7 +- .../swing/filechooser/FileSystemView.java | 6 +- .../javax/swing/text/JTextComponent.java | 8 +- .../java/util/logging/FileHandler.java | 31 +- .../classes/java/util/logging/Handler.java | 31 +- .../classes/java/util/logging/LogManager.java | 56 +- .../classes/java/util/logging/Logger.java | 60 +- .../java/util/logging/LoggingMXBean.java | 5 +- .../java/util/logging/LoggingPermission.java | 20 +- .../java/util/logging/MemoryHandler.java | 11 +- .../java/util/logging/SocketHandler.java | 7 +- .../java/util/logging/StreamHandler.java | 15 +- .../management/remote/rmi/RMIConnection.java | 51 +- .../remote/rmi/RMIConnectionImpl.java | 88 +- .../MBeanServerFileAccessController.java | 17 +- .../lang/management/ClassLoadingMXBean.java | 6 +- .../lang/management/ManagementFactory.java | 4 - .../lang/management/ManagementPermission.java | 57 +- .../java/lang/management/MemoryMXBean.java | 6 +- .../lang/management/MemoryPoolMXBean.java | 14 +- .../management/OperatingSystemMXBean.java | 17 +- .../management/PlatformLoggingMXBean.java | 5 +- .../java/lang/management/RuntimeMXBean.java | 55 +- .../java/lang/management/ThreadMXBean.java | 51 +- .../javax/management/MBeanPermission.java | 6 +- .../classes/javax/management/MBeanServer.java | 188 +- .../javax/management/MBeanServerFactory.java | 28 +- .../management/MBeanServerPermission.java | 6 +- .../management/MBeanTrustPermission.java | 10 +- .../javax/management/monitor/Monitor.java | 26 +- .../remote/SubjectDelegationPermission.java | 6 +- .../naming/ldap/spi/LdapDnsProvider.java | 6 +- .../javax/naming/spi/NamingManager.java | 16 +- .../classes/java/net/http/HttpClient.java | 45 +- .../classes/java/net/http/HttpRequest.java | 13 +- .../classes/java/net/http/HttpResponse.java | 65 - .../classes/java/net/http/WebSocket.java | 8 +- .../classes/java/util/prefs/Preferences.java | 17 +- .../classes/java/rmi/RMISecurityManager.java | 35 +- .../java/rmi/server/RMIClassLoader.java | 103 +- .../java/rmi/server/RMIClassLoaderSpi.java | 15 +- .../java/rmi/server/RMISocketFactory.java | 20 +- .../classes/java/rmi/server/RemoteServer.java | 10 +- .../sun/rmi/registry/RegistryImpl.java | 168 +- .../classes/sun/rmi/server/LoaderHandler.java | 762 +----- .../auth/kerberos/DelegationPermission.java | 21 +- .../security/auth/kerberos/KerberosKey.java | 9 - .../auth/kerberos/KerberosPrincipal.java | 26 +- .../auth/kerberos/KerberosTicket.java | 14 +- .../javax/security/auth/kerberos/KeyTab.java | 14 +- .../auth/kerberos/ServicePermission.java | 44 +- .../classes/org/ietf/jgss/GSSContext.java | 29 +- .../classes/org/ietf/jgss/GSSManager.java | 45 +- .../share/classes/org/ietf/jgss/GSSName.java | 13 +- .../classes/org/ietf/jgss/package-info.java | 4 +- .../sql/rowset/serial/SerialJavaObject.java | 9 +- .../javax/sql/rowset/spi/SyncFactory.java | 36 +- .../share/classes/java/sql/Connection.java | 26 +- .../share/classes/java/sql/DriverManager.java | 24 +- .../share/classes/java/sql/SQLPermission.java | 76 +- .../share/classes/java/sql/package-info.java | 12 +- .../share/classes/javax/xml/XMLConstants.java | 6 +- .../javax/xml/catalog/CatalogManager.java | 4 +- .../sun/tools/attach/AttachPermission.java | 53 +- .../com/sun/tools/attach/VirtualMachine.java | 14 +- .../sun/tools/attach/spi/AttachProvider.java | 19 +- .../jdk/dynalink/CallSiteDescriptor.java | 11 +- .../jdk/dynalink/DynamicLinkerFactory.java | 5 +- .../jdk/dynalink/SecureLookupSupplier.java | 18 +- .../linker/GuardingDynamicLinkerExporter.java | 21 +- .../sun/net/httpserver/SimpleFileServer.java | 8 +- .../httpserver/spi/HttpServerProvider.java | 6 +- .../share/classes/com/sun/jdi/Bootstrap.java | 7 +- .../classes/com/sun/jdi/JDIPermission.java | 45 +- .../share/classes/jdk/jfr/Configuration.java | 5 +- .../share/classes/jdk/jfr/EventFactory.java | 9 +- .../share/classes/jdk/jfr/FlightRecorder.java | 28 +- .../jdk/jfr/FlightRecorderPermission.java | 45 +- .../share/classes/jdk/jfr/Recording.java | 22 +- .../classes/jdk/jfr/ValueDescriptor.java | 9 +- .../classes/jdk/jfr/consumer/EventStream.java | 13 +- .../jdk/jfr/consumer/RecordingFile.java | 12 +- .../jdk/jfr/consumer/RecordingStream.java | 12 +- .../management/jfr/FlightRecorderMXBean.java | 64 +- .../management/jfr/RemoteRecordingStream.java | 13 +- .../management/HotSpotDiagnosticMXBean.java | 16 +- .../com/sun/management/ThreadMXBean.java | 6 +- .../classes/jdk/net/NetworkPermission.java | 6 +- .../share/classes/jdk/net/Sockets.java | 23 - .../share/classes/jdk/nio/Channels.java | 10 +- .../classes/com/sun/nio/sctp/SctpChannel.java | 24 +- .../com/sun/nio/sctp/SctpMultiChannel.java | 28 - .../com/sun/nio/sctp/SctpServerChannel.java | 21 +- .../sun/security/auth/login/ConfigFile.java | 3 - .../security/auth/module/LdapLoginModule.java | 44 +- .../sun/security/jgss/ExtendedGSSContext.java | 7 - .../jgss/InquireSecContextPermission.java | 9 +- test/hotspot/jtreg/ProblemList.txt | 3 + .../compiler/exceptions/ExceptionInInit.java | 96 - .../jvmci/SecurityRestrictionsTest.java | 197 -- .../Nestmates/protectionDomain/Host.java | 44 - .../TestDifferentProtectionDomains.java | 124 - .../attach004/TestDescription.java | 62 - .../AttachOnDemand/attach004/attach004.policy | 9 - .../attach004/attach004Agent00.java | 58 - .../attach004/attach004Agent00.mf | 2 - .../catalog/CatalogReferCircularityTest.java | 5 +- .../catalog/DefaultFeaturesTest.java | 5 +- .../functional/catalog/DeferFeatureTest.java | 11 +- .../catalog/DelegatePublicTest.java | 5 +- .../catalog/DelegateSystemTest.java | 5 +- .../functional/catalog/DelegateUriTest.java | 5 +- .../jaxp/functional/catalog/GroupTest.java | 5 +- .../functional/catalog/LoadCatalogTest.java | 5 +- .../functional/catalog/NextCatalogTest.java | 5 +- .../functional/catalog/NormalizationTest.java | 5 +- .../functional/catalog/PreferFeatureTest.java | 5 +- .../jaxp/functional/catalog/PreferTest.java | 5 +- .../functional/catalog/PublicFamilyTest.java | 5 +- .../jaxp/functional/catalog/PublicTest.java | 5 +- .../catalog/ResolveFeatureTest.java | 5 +- .../functional/catalog/RewriteSystemTest.java | 5 +- .../functional/catalog/RewriteUriTest.java | 5 +- .../catalog/SpecifyCatalogTest.java | 5 +- .../functional/catalog/SystemFamilyTest.java | 5 +- .../functional/catalog/SystemSuffixTest.java | 5 +- .../jaxp/functional/catalog/SystemTest.java | 5 +- .../functional/catalog/UriFamilyTest.java | 5 +- .../functional/catalog/UriSuffixTest.java | 5 +- .../xml/jaxp/functional/catalog/UriTest.java | 5 +- .../functional/catalog/UrnUnwrappingTest.java | 5 +- .../catalog/ValidateCatalogTest.java | 5 +- .../xml/datatype/ptests/DurationTest.java | 5 +- .../ptests/FactoryNewInstanceTest.java | 5 +- .../ptests/XMLGregorianCalendarTest.java | 5 +- .../xml/parsers/ptests/DBFNamespaceTest.java | 5 +- .../ptests/DocumentBuilderFactoryTest.java | 5 +- .../parsers/ptests/DocumentBuilderImpl01.java | 5 +- .../parsers/ptests/FactoryConfErrorTest.java | 5 +- .../ptests/SAXFactoryNewInstanceTest.java | 5 +- .../xml/parsers/ptests/SAXParserFactTest.java | 5 +- .../xml/parsers/ptests/SAXParserTest.java | 15 +- .../xml/parsers/ptests/SAXParserTest02.java | 5 +- .../xml/parsers/ptests/SAXParserTest03.java | 5 +- .../XMLEventFactoryNewInstanceTest.java | 5 +- .../XMLInputFactoryNewInstanceTest.java | 5 +- .../XMLOutputFactoryNewInstanceTest.java | 5 +- .../xml/transform/ptests/Bug6384418Test.java | 5 +- .../xml/transform/ptests/DOMResultTest.java | 5 +- .../transform/ptests/ErrorListenerTest.java | 5 +- .../xml/transform/ptests/SAXSourceTest.java | 5 +- .../xml/transform/ptests/SAXTFactoryTest.java | 5 +- .../transform/ptests/StreamResultTest.java | 5 +- .../transform/ptests/TfClearParamTest.java | 5 +- .../xml/transform/ptests/TransformTest.java | 5 +- .../transform/ptests/TransformerExcpTest.java | 5 +- .../ptests/TransformerFactoryTest.java | 5 +- .../xml/transform/ptests/TransformerTest.java | 5 +- .../transform/ptests/TransformerTest02.java | 5 +- .../transform/ptests/TransformerTest03.java | 5 +- .../xml/transform/ptests/URIResolverTest.java | 5 +- .../ptests/othervm/TFCErrorTest.java | 5 +- .../validation/ptests/SchemaFactoryTest.java | 5 +- .../ptests/TypeInfoProviderTest.java | 5 +- .../ptests/ValidatorHandlerTest.java | 5 +- .../xml/validation/ptests/ValidatorTest.java | 5 +- .../ptests/XPathEvaluationResultTest.java | 5 +- .../xml/xpath/ptests/XPathExpressionTest.java | 5 +- .../xml/xpath/ptests/XPathFactoryTest.java | 5 +- .../ptests/XPathFunctionResolverTest.java | 5 +- .../javax/xml/xpath/ptests/XPathTest.java | 5 +- .../org/w3c/dom/ptests/AttrTest.java | 5 +- .../org/w3c/dom/ptests/CommentTest.java | 5 +- .../org/w3c/dom/ptests/DocumentTest.java | 5 +- .../org/w3c/dom/ptests/DocumentTypeTest.java | 5 +- .../w3c/dom/ptests/DomImplementationTest.java | 5 +- .../org/w3c/dom/ptests/ElementTest.java | 5 +- .../org/w3c/dom/ptests/EntityChildTest.java | 5 +- .../org/w3c/dom/ptests/NamedNodeMapTest.java | 5 +- .../org/w3c/dom/ptests/NodeListTest.java | 5 +- .../org/w3c/dom/ptests/NodeTest.java | 10 +- .../org/w3c/dom/ptests/NotationTest.java | 5 +- .../functional/org/w3c/dom/ptests/PITest.java | 5 +- .../org/w3c/dom/ptests/TextTest.java | 5 +- .../org/w3c/dom/ptests/TypeInfoTest.java | 5 +- .../org/xml/sax/ptests/AttrImplTest.java | 5 +- .../org/xml/sax/ptests/AttributesNSTest.java | 5 +- .../org/xml/sax/ptests/AttributesTest.java | 5 +- .../xml/sax/ptests/ContentHandlerTest.java | 5 +- .../xml/sax/ptests/DefaultHandlerTest.java | 5 +- .../org/xml/sax/ptests/EHFatalTest.java | 5 +- .../org/xml/sax/ptests/NSSupportTest.java | 5 +- .../org/xml/sax/ptests/NSTableTest.java | 5 +- .../org/xml/sax/ptests/ParserAdapterTest.java | 5 +- .../org/xml/sax/ptests/ResolverTest.java | 5 +- .../xml/sax/ptests/SAXParserNSTableTest.java | 5 +- .../org/xml/sax/ptests/XMLFilterCBTest.java | 5 +- .../org/xml/sax/ptests/XMLFilterTest.java | 5 +- .../xml/sax/ptests/XMLReaderAdapterTest.java | 5 +- .../xml/sax/ptests/XMLReaderFactoryTest.java | 5 +- .../xml/sax/ptests/XMLReaderNSTableTest.java | 5 +- .../org/xml/sax/ptests/XMLReaderTest.java | 5 +- .../jaxp/functional/test/astro/AstroTest.java | 5 +- .../functional/test/astro/DocumentLSTest.java | 5 +- .../test/astro/NamespaceContextTest.java | 5 +- .../functional/test/astro/SAX201Test.java | 5 +- .../test/astro/SchemaValidationTest.java | 5 +- .../functional/test/astro/XPathAPITest.java | 5 +- .../test/auctionportal/AuctionController.java | 5 +- .../auctionportal/AuctionItemRepository.java | 5 +- .../test/auctionportal/UserController.java | 5 +- .../functional/test/gaptest/Bug4511326.java | 5 +- .../functional/test/gaptest/Bug4512806.java | 5 +- .../functional/test/gaptest/Bug4515047.java | 5 +- .../functional/test/gaptest/Bug4515660.java | 5 +- .../functional/test/gaptest/Bug4693341.java | 5 +- .../functional/test/gaptest/Bug4848653.java | 5 +- .../functional/test/gaptest/Bug4858685.java | 5 +- .../jaxp/libs/jaxp/library/BasePolicy.java | 75 - .../jaxp/libs/jaxp/library/FilePolicy.java | 51 - .../libs/jaxp/library/InternalAPIPolicy.java | 43 - .../libs/jaxp/library/JAXPPolicyManager.java | 317 --- .../libs/jaxp/library/JAXPTestPolicy.java | 60 - .../libs/jaxp/library/JAXPTestUtilities.java | 136 +- .../libs/jaxp/library/NetAccessPolicy.java | 43 - .../unittest/catalog/CatalogAccessTest.java | 76 - .../catalog/CatalogFileInputTest.java | 4 +- .../unittest/catalog/CatalogResolverTest.java | 4 +- .../jaxp/unittest/catalog/CatalogSupport.java | 5 +- .../unittest/catalog/CatalogSupport1.java | 5 +- .../unittest/catalog/CatalogSupport2.java | 5 +- .../unittest/catalog/CatalogSupport3.java | 5 +- .../unittest/catalog/CatalogSupport4.java | 5 +- .../unittest/catalog/CatalogSupport5.java | 5 +- .../jaxp/unittest/catalog/CatalogTest.java | 5 +- .../xml/jaxp/unittest/catalog/GroupTest.java | 4 +- .../xml/jaxp/unittest/common/Bug6350682.java | 11 +- .../jaxp/unittest/common/Bug6723276Test.java | 5 +- .../jaxp/unittest/common/Bug7143711Test.java | 115 - .../unittest/common/CDataChunkSizeTest.java | 5 +- .../common/EncodingErrorsReportingTest.java | 5 +- .../xml/jaxp/unittest/common/Sources.java | 8 +- .../common/TransformationWarningsTest.java | 5 +- .../common/ValidationWarningsTest.java | 5 +- .../unittest/common/WarningsTestBase.java | 12 +- .../common/prettyprint/PrettyPrintTest.java | 5 +- .../jaxp/unittest/datatype/Bug6320118.java | 5 +- .../unittest/datatype/Bug6937951Test.java | 5 +- .../unittest/datatype/Bug6937964Test.java | 5 +- .../unittest/datatype/Bug7042647Test.java | 5 +- .../datatype/DatatypeFactoryTest.java | 5 +- .../jaxp/unittest/datatype/DurationTest.java | 5 +- .../unittest/datatype/FactoryFindTest.java | 13 +- .../unittest/datatype/JDK8068839Test.java | 5 +- .../datatype/XMLGregorianCalendarTest.java | 5 +- .../xml/jaxp/unittest/dom/Bug4915524.java | 5 +- .../xml/jaxp/unittest/dom/Bug4915748.java | 5 +- .../xml/jaxp/unittest/dom/Bug4966082.java | 5 +- .../xml/jaxp/unittest/dom/Bug4966138.java | 5 +- .../xml/jaxp/unittest/dom/Bug4966142.java | 5 +- .../xml/jaxp/unittest/dom/Bug4966143.java | 5 +- .../xml/jaxp/unittest/dom/Bug6339023.java | 5 +- .../xml/jaxp/unittest/dom/Bug6355326.java | 5 +- .../xml/jaxp/unittest/dom/Bug6367542.java | 5 +- .../xml/jaxp/unittest/dom/Bug6520131.java | 5 +- .../xml/jaxp/unittest/dom/Bug6521260.java | 5 +- .../xml/jaxp/unittest/dom/Bug6582545Test.java | 5 +- .../xml/jaxp/unittest/dom/Bug6879614Test.java | 5 +- .../xml/jaxp/unittest/dom/CR6333993Test.java | 5 +- .../xml/jaxp/unittest/dom/CR6517707Test.java | 5 +- .../xml/jaxp/unittest/dom/CR6517717Test.java | 5 +- .../xml/jaxp/unittest/dom/CR6909336Test.java | 5 +- .../unittest/dom/DOMConfigurationTest.java | 5 +- .../xml/jaxp/unittest/dom/DOMFeatureTest.java | 4 +- .../xml/jaxp/unittest/dom/DOMXPathTest.java | 5 +- .../xml/jaxp/unittest/dom/DocumentTest.java | 4 +- .../jaxp/unittest/dom/ElementTraversal.java | 5 +- .../xml/jaxp/unittest/dom/JdkXmlDomTest.java | 11 +- .../jaxp/unittest/dom/TCKEncodingTest.java | 5 +- .../xml/jaxp/unittest/dom/ls/Bug4973153.java | 5 +- .../xml/jaxp/unittest/dom/ls/Bug6290947.java | 5 +- .../xml/jaxp/unittest/dom/ls/Bug6354955.java | 5 +- .../xml/jaxp/unittest/dom/ls/Bug6376823.java | 5 +- .../jaxp/unittest/dom/ls/Bug6710741Test.java | 5 +- .../jaxp/unittest/dom/ls/LSParserTCKTest.java | 5 +- .../jaxp/unittest/dom/ls/LSParserTest.java | 5 +- .../unittest/dom/ls/LSSerializerTest.java | 5 +- .../unittest/parsers/BaseParsingTest.java | 5 +- .../parsers/Bug4674384_MAX_OCCURS_Test.java | 5 +- .../xml/jaxp/unittest/parsers/Bug4934208.java | 5 +- .../xml/jaxp/unittest/parsers/Bug4967002.java | 5 +- .../xml/jaxp/unittest/parsers/Bug4985486.java | 5 +- .../xml/jaxp/unittest/parsers/Bug4991020.java | 5 +- .../xml/jaxp/unittest/parsers/Bug4991946.java | 5 +- .../xml/jaxp/unittest/parsers/Bug5010072.java | 5 +- .../xml/jaxp/unittest/parsers/Bug5025825.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6309988.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6341770.java | 25 +- .../xml/jaxp/unittest/parsers/Bug6361283.java | 5 +- .../jaxp/unittest/parsers/Bug6506304Test.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6518733.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6564400.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6573786.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6594813.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6608841.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6690015.java | 5 +- .../xml/jaxp/unittest/parsers/Bug6760982.java | 5 +- .../jaxp/unittest/parsers/Bug6849942Test.java | 5 +- .../jaxp/unittest/parsers/Bug7157608Test.java | 5 +- .../jaxp/unittest/parsers/Bug7166896Test.java | 5 +- .../jaxp/unittest/parsers/Bug8003147Test.java | 75 +- .../xml/jaxp/unittest/parsers/Bug8073385.java | 13 +- .../unittest/parsers/FactoryFindTest.java | 13 +- .../jaxp/unittest/parsers/HandleError.java | 5 +- .../unittest/parsers/ParseEmptyStream.java | 5 +- .../unittest/parsers/SupplementaryChars.java | 3 - .../parsers/xinclude/Bug6794483Test.java | 5 +- .../unittest/sax/Attributes2ImplTest.java | 5 +- .../xml/jaxp/unittest/sax/Bug6889654Test.java | 5 +- .../xml/jaxp/unittest/sax/Bug6925410Test.java | 5 +- .../xml/jaxp/unittest/sax/Bug6949607Test.java | 5 +- .../xml/jaxp/unittest/sax/Bug6992561Test.java | 5 +- .../xml/jaxp/unittest/sax/Bug7057778Test.java | 13 +- .../unittest/sax/DefaultHandler2Test.java | 5 +- .../jaxp/unittest/sax/IssueTracker56Test.java | 5 +- .../xml/jaxp/unittest/sax/NSSupportTest.java | 5 +- .../xml/jaxp/unittest/sax/SAXParserTest.java | 4 +- .../unittest/sax/SymbolTableResetTest.java | 14 +- .../xml/jaxp/unittest/sax/XMLReaderTest.java | 5 +- .../AttributeLocalNameTest.java | 5 +- .../xml/jaxp/unittest/stream/Bug6370703.java | 5 +- .../xml/jaxp/unittest/stream/Bug6378422.java | 5 +- .../xml/jaxp/unittest/stream/Bug6380870.java | 5 +- .../xml/jaxp/unittest/stream/Bug6489502.java | 5 +- .../xml/jaxp/unittest/stream/Bug6509774.java | 5 +- .../jaxp/unittest/stream/Bug6688002Test.java | 5 +- .../jaxp/unittest/stream/Bug6976938Test.java | 5 +- .../stream/CoalesceTest/CoalesceTest.java | 5 +- .../stream/EntitiesTest/EntityTest.java | 5 +- .../stream/EventReaderDelegateTest.java | 5 +- .../stream/EventsTest/Issue41Test.java | 5 +- .../stream/EventsTest/Issue48Test.java | 5 +- .../stream/EventsTest/Issue53Test.java | 5 +- .../stream/EventsTest/Issue58Test.java | 5 +- .../jaxp/unittest/stream/FactoryFindTest.java | 17 +- .../stream/IgnoreExternalDTDTest.java | 5 +- .../ProcessingInstructionTest.java | 5 +- .../stream/StreamReaderDelegateTest.java | 5 +- .../unittest/stream/XMLEventLocationTest.java | 5 +- .../stream/XMLEventReaderTest/Bug6489890.java | 5 +- .../stream/XMLEventReaderTest/Bug6555001.java | 98 +- .../XMLEventReaderTest/Bug6586466Test.java | 5 +- .../XMLEventReaderTest/Bug6613059Test.java | 5 +- .../XMLEventReaderTest/Bug6668115Test.java | 5 +- .../XMLEventReaderTest/Bug6846133Test.java | 5 +- .../stream/XMLEventReaderTest/Bug8153781.java | 5 +- .../XMLEventReaderTest/EventReaderTest.java | 7 +- .../XMLEventReaderTest/Issue40Test.java | 5 +- .../stream/XMLEventReaderTest/JDK8201138.java | 5 +- .../stream/XMLEventReaderTest/JDK8209615.java | 5 +- .../ReaderToWriterTest.java | 5 +- .../XMLEventWriterTest.java | 5 +- .../XMLInputFactoryTest/Bug6756677Test.java | 17 +- .../XMLInputFactoryTest/Bug6909759Test.java | 5 +- .../XMLInputFactoryTest/IssueTracker38.java | 5 +- .../XMLOutputFactoryTest/Bug6846132Test.java | 5 +- .../DuplicateNSDeclarationTest.java | 5 +- .../StreamResultTest.java | 5 +- .../XMLResolverTest/XMLResolverTest.java | 5 +- .../ExceptionCauseTest.java | 5 +- .../XMLStreamExceptionTest/ExceptionTest.java | 5 +- .../XMLStreamFilterTest/Bug6481615.java | 5 +- .../XMLStreamFilterTest/Bug6481678.java | 5 +- .../XMLStreamFilterTest/HasNextTest.java | 5 +- .../stream/XMLStreamReaderTest/BOMTest.java | 5 +- .../XMLStreamReaderTest/Bug6388460.java | 5 +- .../XMLStreamReaderTest/Bug6472982Test.java | 5 +- .../XMLStreamReaderTest/Bug6767322Test.java | 5 +- .../XMLStreamReaderTest/Bug6847819Test.java | 5 +- .../stream/XMLStreamReaderTest/BugTest.java | 5 +- .../DefaultAttributeTest.java | 5 +- .../XMLStreamReaderTest/DoubleXmlnsTest.java | 5 +- .../XMLStreamReaderTest/IsValidatingTest.java | 5 +- .../XMLStreamReaderTest/Issue44Test.java | 5 +- .../XMLStreamReaderTest/Issue47Test.java | 5 +- .../XMLStreamReaderTest/IssueTracker24.java | 5 +- .../XMLStreamReaderTest/IssueTracker35.java | 5 +- .../XMLStreamReaderTest/IssueTracker70.java | 5 +- .../Jsr173MR1Req5Test.java | 5 +- .../Jsr173MR1Req8Test.java | 5 +- .../XMLStreamReaderTest/NamespaceTest.java | 5 +- .../XMLStreamReaderTest/StreamReaderTest.java | 5 +- .../XMLStreamReaderTest/SupportDTDTest.java | 5 +- .../XMLStreamReaderTest/VoiceXMLDTDTest.java | 5 +- .../stream/XMLStreamReaderTest/XML11Test.java | 5 +- .../AttributeEscapeTest.java | 5 +- .../XMLStreamWriterTest/Bug6452107.java | 5 +- .../XMLStreamWriterTest/Bug6600882Test.java | 5 +- .../XMLStreamWriterTest/Bug6675332Test.java | 5 +- .../XMLStreamWriterTest/Bug7037352Test.java | 5 +- .../XMLStreamWriterTest/DomUtilTest.java | 5 +- .../XMLStreamWriterTest/EmptyElementTest.java | 5 +- .../XMLStreamWriterTest/EncodingTest.java | 5 +- .../XMLStreamWriterTest/NamespaceTest.java | 5 +- .../NullUriDetectionTest.java | 5 +- .../XMLStreamWriterTest/SqeLinuxTest.java | 5 +- .../XMLStreamWriterTest/SurrogatesTest.java | 5 +- .../UnprefixedNameTest.java | 5 +- .../XMLStreamWriterTest/WriterTest.java | 5 +- .../XMLStreamWriterTest.java | 5 +- .../unittest/transform/Bug4693341Test.java | 5 +- .../jaxp/unittest/transform/Bug4892774.java | 5 +- .../jaxp/unittest/transform/Bug5073477.java | 5 +- .../jaxp/unittest/transform/Bug6175602.java | 5 +- .../jaxp/unittest/transform/Bug6206491.java | 5 +- .../unittest/transform/Bug6216226Test.java | 13 +- .../jaxp/unittest/transform/Bug6311448.java | 5 +- .../jaxp/unittest/transform/Bug6384805.java | 5 +- .../jaxp/unittest/transform/Bug6465722.java | 5 +- .../jaxp/unittest/transform/Bug6467808.java | 5 +- .../jaxp/unittest/transform/Bug6490380.java | 5 +- .../jaxp/unittest/transform/Bug6490921.java | 5 +- .../jaxp/unittest/transform/Bug6513892.java | 5 +- .../jaxp/unittest/transform/Bug6537167.java | 5 +- .../jaxp/unittest/transform/Bug6540545.java | 5 +- .../jaxp/unittest/transform/Bug6551616.java | 5 +- .../jaxp/unittest/transform/Bug6559595.java | 5 +- .../jaxp/unittest/transform/Bug6565260.java | 5 +- .../jaxp/unittest/transform/Bug6940416.java | 5 +- .../unittest/transform/BugDB12665704Test.java | 5 +- .../xml/jaxp/unittest/transform/CLITest.java | 26 +- .../unittest/transform/CR6401137Test.java | 5 +- .../unittest/transform/CR6551600Test.java | 76 +- .../unittest/transform/CR6577667Test.java | 5 +- .../unittest/transform/CR6652519Test.java | 5 +- .../unittest/transform/CR6689809Test.java | 5 +- .../unittest/transform/CR6905829Test.java | 5 +- .../unittest/transform/CR6935697Test.java | 5 +- .../unittest/transform/CR6941869Test.java | 5 +- .../unittest/transform/CR6957215Test.java | 5 +- .../unittest/transform/CR7098746Test.java | 5 +- .../unittest/transform/DOMResultTest.java | 5 +- .../unittest/transform/FactoryFindTest.java | 13 +- .../unittest/transform/Issue2204Test.java | 5 +- .../unittest/transform/Issue2290Test.java | 5 +- .../jaxp/unittest/transform/JDK8207760.java | 5 +- .../transform/NamespacePrefixTest.java | 12 +- .../jaxp/unittest/transform/SAX2DOMTest.java | 5 +- .../transform/SecureProcessingTest.java | 5 +- .../jaxp/unittest/transform/SourceTest.java | 5 +- .../unittest/transform/StAXSourceTest.java | 5 +- .../unittest/transform/StylesheetTest.java | 6 +- .../unittest/transform/SurrogateTest.java | 15 +- .../unittest/transform/TemplatesTest.java | 5 +- .../transform/TransformerFactoryTest.java | 5 +- .../unittest/transform/TransformerTest.java | 5 +- .../unittest/transform/XSLTFunctionsTest.java | 16 +- .../unittest/transform/sax/Bug6451633.java | 5 +- .../unittest/transform/sort/SortTest.java | 5 +- .../unittest/transform/util/StreamUtil.java | 11 +- .../unittest/validation/AnyElementTest.java | 5 +- .../jaxp/unittest/validation/Bug4966232.java | 5 +- .../jaxp/unittest/validation/Bug4966254.java | 5 +- .../jaxp/unittest/validation/Bug4969042.java | 5 +- .../jaxp/unittest/validation/Bug4969089.java | 5 +- .../jaxp/unittest/validation/Bug4969110.java | 5 +- .../jaxp/unittest/validation/Bug4969689.java | 5 +- .../jaxp/unittest/validation/Bug4969692.java | 5 +- .../jaxp/unittest/validation/Bug4969693.java | 5 +- .../jaxp/unittest/validation/Bug4969695.java | 5 +- .../jaxp/unittest/validation/Bug4969732.java | 5 +- .../jaxp/unittest/validation/Bug4970380.java | 5 +- .../jaxp/unittest/validation/Bug4970383.java | 5 +- .../jaxp/unittest/validation/Bug4970400.java | 5 +- .../jaxp/unittest/validation/Bug4970402.java | 5 +- .../jaxp/unittest/validation/Bug4970951.java | 5 +- .../jaxp/unittest/validation/Bug4971605.java | 5 +- .../jaxp/unittest/validation/Bug4971607.java | 5 +- .../jaxp/unittest/validation/Bug4972882.java | 5 +- .../jaxp/unittest/validation/Bug4986844.java | 5 +- .../jaxp/unittest/validation/Bug4987574.java | 5 +- .../jaxp/unittest/validation/Bug4988267.java | 5 +- .../jaxp/unittest/validation/Bug4988268.java | 5 +- .../jaxp/unittest/validation/Bug4988387.java | 5 +- .../jaxp/unittest/validation/Bug4996446.java | 5 +- .../jaxp/unittest/validation/Bug4997818.java | 5 +- .../jaxp/unittest/validation/Bug5011500.java | 5 +- .../jaxp/unittest/validation/Bug5072946.java | 5 +- .../jaxp/unittest/validation/Bug6378043.java | 5 +- .../jaxp/unittest/validation/Bug6449797.java | 5 +- .../jaxp/unittest/validation/Bug6457662.java | 5 +- .../unittest/validation/Bug6467424Test.java | 5 +- .../jaxp/unittest/validation/Bug6483188.java | 5 +- .../jaxp/unittest/validation/Bug6493687.java | 5 +- .../jaxp/unittest/validation/Bug6509668.java | 5 +- .../jaxp/unittest/validation/Bug6526547.java | 5 +- .../jaxp/unittest/validation/Bug6531160.java | 5 +- .../unittest/validation/Bug6695843Test.java | 5 +- .../unittest/validation/Bug6773084Test.java | 11 +- .../jaxp/unittest/validation/Bug6859210.java | 5 +- .../unittest/validation/Bug6925531Test.java | 166 +- .../unittest/validation/Bug6946312Test.java | 5 +- .../unittest/validation/Bug6954738_Test.java | 5 +- .../unittest/validation/CR6708840Test.java | 5 +- .../jaxp/unittest/validation/CR6740048.java | 5 +- .../unittest/validation/Issue682Test.java | 5 +- .../unittest/validation/IssueTracker30.java | 5 +- .../unittest/validation/JaxpIssue43Test.java | 5 +- .../jaxp/unittest/validation/JaxpIssue49.java | 5 +- .../validation/LargeMaxOccursTest.java | 5 +- .../unittest/validation/MultiOccursTest.java | 5 +- .../validation/MultiOccursUnboundedTest.java | 5 +- .../jaxp/unittest/validation/OccursTest.java | 5 +- .../validation/OccursUnboundedTest.java | 5 +- .../validation/OccursWildcardTest.java | 5 +- .../validation/OccursWildcardUnbounded.java | 5 +- .../validation/ParticlesId005Test.java | 5 +- .../validation/ParticlesIg004Test.java | 5 +- .../validation/ParticlesQ013Test.java | 5 +- .../unittest/validation/TCKGroupA008Test.java | 5 +- .../unittest/validation/ValidationTest.java | 4 +- .../unittest/validation/ValidatorTest.java | 17 +- .../validation/tck/Bug6943252Test.java | 5 +- .../validation/tck/Bug6963124Test.java | 5 +- .../validation/tck/Bug6963468Test.java | 5 +- .../validation/tck/Bug6964720Test.java | 5 +- .../validation/tck/Bug6967214Test.java | 5 +- .../validation/tck/Bug6970890Test.java | 5 +- .../validation/tck/Bug6971190Test.java | 5 +- .../validation/tck/Bug6974551Test.java | 5 +- .../validation/tck/Bug6975265Test.java | 5 +- .../validation/tck/Bug6977201Test.java | 5 +- .../validation/tck/Bug6989956Test.java | 5 +- .../validation/tck/Bug7014246Test.java | 5 +- .../unittest/validation/tck/ParticleTest.java | 5 +- .../unittest/validation/tck/RegexWord.java | 5 +- .../xml/jaxp/unittest/xpath/Bug4991857.java | 5 +- .../xml/jaxp/unittest/xpath/Bug4991939.java | 5 +- .../xml/jaxp/unittest/xpath/Bug4992788.java | 5 +- .../xml/jaxp/unittest/xpath/Bug4992793.java | 5 +- .../xml/jaxp/unittest/xpath/Bug4992805.java | 5 +- .../jaxp/unittest/xpath/ClassLoaderTest.java | 12 +- .../unittest/xpath/SecureProcessingTest.java | 5 +- .../jaxp/unittest/xpath/XPathAnyTypeTest.java | 5 +- .../unittest/xpath/XPathExpAnyTypeTest.java | 5 +- test/jdk/ProblemList.txt | 6 + test/jdk/TEST.groups | 6 +- .../TestAESWithProviderChange.java | 3 +- .../TestAESWithRemoveAddProvider.java | 3 +- .../Cipher/AES/TestAESCiphers/testAES.policy | 7 - .../util/8051626/Bug8051626.java | 78 - .../sun/jndi/ldap/LdapDnsProviderTest.java | 52 +- .../DcmdMBeanPermissionsTest.java | 246 -- ...rTest.java => RootDirPermissionsTest.java} | 129 +- .../SecurityManagerTestNoRead.policy | 39 - .../SecurityManagerTestRead.policy | 43 - .../security/auth/UnixPrincipalHashCode.java | 4 +- .../login/ConfigFile/InnerClassConfig.java | 4 +- .../login/ConfigFile/InnerClassConfig.policy | 8 - .../login/ConfigFile/PropertyExpansion.java | 57 +- .../login/ConfigFile/PropertyExpansion.policy | 8 - .../module/LdapLoginModule/CheckConfigs.java | 8 +- .../LdapLoginModule/CheckConfigs.policy | 10 - test/jdk/com/sun/security/auth/uphc.policy | 6 - .../com/sun/tools/attach/PermissionTest.java | 136 - .../com/sun/tools/attach/java.policy.allow | 22 - .../jdk/com/sun/tools/attach/java.policy.deny | 18 - .../java/awt/Debug/DumpOnKey/DumpOnKey.java | 4 +- test/jdk/java/awt/Debug/DumpOnKey/dump.policy | 3 - .../DefaultPermissions.java | 39 - .../Desktop/DefaultPermissions/java.policy | 1 - .../SecurityTest/DesktopSecurityTest.java | 192 -- .../awt/Desktop/SecurityTest/desktop.policy | 7 - .../ModalDialogPermission.java | 61 - .../Dialog/ModalDialogPermission/java.policy | 3 - .../PropertyPermissionOnEDT.java | 106 - .../PropertyPermissionOnEDT/java.policy | 4 - .../CloseDialogActivateOwnerTest.java | 110 - .../CloseDialogActivateOwnerTest/java.policy | 3 - .../awt/FontClass/CreateFont/BigFont.java | 160 -- .../CreateFont/fileaccess/FontFile.java | 104 - .../CreateFont/fileaccess/TestFontFile.sh | 80 - test/jdk/java/awt/FontClass/FontAccess.java | 48 - .../jdk/java/awt/FontClass/FontPrivilege.java | 41 - .../awt/FullScreen/SetFSWindow/FSFrame.java | 53 +- .../PrintJob/Security/SecurityDialogTest.java | 106 - test/jdk/java/awt/PrintJob/Security/policy | 32 - .../java/awt/Toolkit/GetImage/bug8078165.java | 18 +- .../Toolkit/SecurityTest/SecurityTest2.java | 53 - .../FunctionalityCheck.java | 11 +- .../FunctionalityCheck/tray.policy | 23 - .../NoPermissionTest/NoPermissionTest.java | 65 - .../NoPermissionTest/tray.policy | 3 - .../PermissionTest/PermissionTest.java | 51 - .../SecurityCheck/PermissionTest/tray.policy | 3 - .../jdk/java/awt/color/LoadProfileWithSM.java | 43 - .../java/awt/color/StandardProfileTest.java | 55 - .../java/awt/color/StandardProfileTest.policy | 30 - .../DragInterceptorAppletTest.java | 153 -- .../DragInterceptorFrame.java | 128 - .../InterprocessMessages.java | 32 - .../SourceFrame.java | 68 - .../RegisterKeyStroke/TestAWTKeyStroke.java | 6 +- .../event/KeyEvent/RegisterKeyStroke/policy | 2 - test/jdk/java/awt/image/mlib/MlibOpsTest.java | 7 +- .../java/awt/image/mlib/mlib.security.policy | 3 - .../print/PrintServicesSecurityManager.java | 49 - .../awt/print/PrinterJob/CheckAccess.java | 95 - .../awt/print/PrinterJob/GetUserNameTest.java | 49 - .../print/PrinterJob/GetUserNameTest.policy | 28 - .../process/ProcessCommunicator.java | 3 +- test/jdk/java/awt/security/Permissions.java | 105 - .../WarningWindowDisposeCrashTest.java | 54 - .../WarningWindowDisposeTest.java | 97 - .../security/WarningWindowDisposeTest/policy | 3 - test/jdk/java/beans/Beans/Test4080522.java | 99 - .../java/beans/EventHandler/Test6277246.java | 60 - .../java/beans/EventHandler/Test6277266.java | 65 - .../Introspector/7084904/Test7084904.java | 5 +- .../java/beans/Introspector/Test4683761.java | 6 +- .../java/beans/Introspector/Test6277246.java | 55 - .../PropertyEditor/TestBooleanClass.java | 40 - .../beans/PropertyEditor/TestBooleanType.java | 40 - .../beans/PropertyEditor/TestByteClass.java | 40 - .../beans/PropertyEditor/TestByteType.java | 40 - .../beans/PropertyEditor/TestColorClass.java | 43 - .../beans/PropertyEditor/TestDoubleClass.java | 40 - .../beans/PropertyEditor/TestDoubleType.java | 40 - .../beans/PropertyEditor/TestEnumClass.java | 42 - .../PropertyEditor/TestEnumSubclass.java | 54 - .../beans/PropertyEditor/TestFloatClass.java | 40 - .../beans/PropertyEditor/TestFloatType.java | 40 - .../beans/PropertyEditor/TestFontClass.java | 43 - .../PropertyEditor/TestIntegerClass.java | 40 - .../beans/PropertyEditor/TestIntegerType.java | 40 - .../beans/PropertyEditor/TestLongClass.java | 40 - .../beans/PropertyEditor/TestLongType.java | 40 - .../beans/PropertyEditor/TestShortClass.java | 40 - .../beans/PropertyEditor/TestShortType.java | 40 - .../beans/PropertyEditor/TestStringClass.java | 40 - .../LoadingStandardIcons.java | 4 +- .../LoadingStandardIcons/java.policy | 1 - .../Statement/ClassForName/ClassForName.java | 3 +- .../beans/Statement/ClassForName/java.policy | 1 - .../jdk/java/beans/Statement/Test6224433.java | 56 - .../beans/XMLDecoder/spec/AbstractTest.java | 11 +- .../java/beans/XMLDecoder/spec/TestArray.java | 6 +- .../beans/XMLDecoder/spec/TestBoolean.java | 6 +- .../java/beans/XMLDecoder/spec/TestByte.java | 6 +- .../java/beans/XMLDecoder/spec/TestChar.java | 6 +- .../java/beans/XMLDecoder/spec/TestClass.java | 6 +- .../beans/XMLDecoder/spec/TestDouble.java | 6 +- .../java/beans/XMLDecoder/spec/TestFalse.java | 6 +- .../java/beans/XMLDecoder/spec/TestField.java | 6 +- .../java/beans/XMLDecoder/spec/TestFloat.java | 6 +- .../java/beans/XMLDecoder/spec/TestInt.java | 6 +- .../java/beans/XMLDecoder/spec/TestJava.java | 6 +- .../java/beans/XMLDecoder/spec/TestLong.java | 6 +- .../beans/XMLDecoder/spec/TestMethod.java | 6 +- .../java/beans/XMLDecoder/spec/TestNew.java | 6 +- .../java/beans/XMLDecoder/spec/TestNull.java | 6 +- .../beans/XMLDecoder/spec/TestObject.java | 6 +- .../beans/XMLDecoder/spec/TestProperty.java | 6 +- .../java/beans/XMLDecoder/spec/TestShort.java | 6 +- .../beans/XMLDecoder/spec/TestString.java | 6 +- .../java/beans/XMLDecoder/spec/TestTrue.java | 6 +- .../java/beans/XMLDecoder/spec/TestVar.java | 6 +- .../4741757/TestSecurityManager.java | 47 - .../beans/XMLEncoder/6777487/TestBox.java | 5 +- .../6777487/TestCheckedCollection.java | 5 +- .../XMLEncoder/6777487/TestCheckedList.java | 5 +- .../XMLEncoder/6777487/TestCheckedMap.java | 5 +- .../6777487/TestCheckedRandomAccessList.java | 5 +- .../XMLEncoder/6777487/TestCheckedSet.java | 5 +- .../6777487/TestCheckedSortedMap.java | 5 +- .../6777487/TestCheckedSortedSet.java | 5 +- .../beans/XMLEncoder/6777487/TestEncoder.java | 4 +- .../beans/XMLEncoder/6777487/TestEnumMap.java | 5 +- .../beans/XMLEncoder/6777487/TestEnumSet.java | 5 +- .../java/beans/XMLEncoder/AbstractTest.java | 11 +- .../XMLEncoder/ReferenceToNonStaticField.java | 6 +- .../java/beans/XMLEncoder/Test4631471.java | 14 +- .../java/beans/XMLEncoder/Test4652928.java | 6 +- .../java/beans/XMLEncoder/Test4679556.java | 6 +- .../java/beans/XMLEncoder/Test4903007.java | 6 +- .../java/beans/XMLEncoder/Test4935607.java | 6 +- .../java/beans/XMLEncoder/Test4936682.java | 6 +- .../java/beans/XMLEncoder/Test4993777.java | 6 +- .../java/beans/XMLEncoder/Test4994637.java | 6 +- .../java/beans/XMLEncoder/Test5023550.java | 6 +- .../java/beans/XMLEncoder/Test5023552.java | 6 +- .../java/beans/XMLEncoder/Test5023557.java | 6 +- .../java/beans/XMLEncoder/Test5023559.java | 6 +- .../java/beans/XMLEncoder/Test6176120.java | 6 +- .../java/beans/XMLEncoder/Test6187118.java | 6 +- .../java/beans/XMLEncoder/Test6256805.java | 6 +- .../java/beans/XMLEncoder/Test6437265.java | 6 +- .../java/beans/XMLEncoder/Test6501431.java | 6 +- .../java/beans/XMLEncoder/Test6505888.java | 6 +- .../java/beans/XMLEncoder/Test6531597.java | 6 +- .../java/beans/XMLEncoder/Test6570354.java | 6 +- .../java/beans/XMLEncoder/Test6852574.java | 6 +- .../java/beans/XMLEncoder/Test6921644.java | 6 +- .../java/beans/XMLEncoder/Test6989223.java | 6 +- .../java/beans/XMLEncoder/Test7080156.java | 6 +- .../java/beans/XMLEncoder/Test7092744.java | 6 +- .../java/beans/XMLEncoder/Test7169395.java | 6 +- .../java/beans/XMLEncoder/Test8013416.java | 6 +- .../java/beans/XMLEncoder/Test8013557.java | 6 +- .../java/beans/XMLEncoder/Test8016545.java | 6 +- .../java/beans/XMLEncoder/Test8027066.java | 6 +- .../XMLEncoder/java_awt_AWTKeyStroke.java | 6 +- .../XMLEncoder/java_awt_BasicStroke.java | 6 +- .../XMLEncoder/java_awt_BorderLayout.java | 6 +- .../beans/XMLEncoder/java_awt_CardLayout.java | 6 +- .../java/beans/XMLEncoder/java_awt_Color.java | 6 +- .../beans/XMLEncoder/java_awt_Component.java | 6 +- .../beans/XMLEncoder/java_awt_Cursor.java | 6 +- .../beans/XMLEncoder/java_awt_Dimension.java | 6 +- .../java/beans/XMLEncoder/java_awt_Font.java | 6 +- .../XMLEncoder/java_awt_GradientPaint.java | 6 +- .../java_awt_GridBagConstraints.java | 6 +- .../XMLEncoder/java_awt_GridBagLayout.java | 8 +- .../beans/XMLEncoder/java_awt_Insets.java | 6 +- .../java_awt_LinearGradientPaint.java | 11 +- .../XMLEncoder/java_awt_MenuShortcut.java | 6 +- .../java/beans/XMLEncoder/java_awt_Point.java | 6 +- .../java_awt_RadialGradientPaint.java | 11 +- .../beans/XMLEncoder/java_awt_Rectangle.java | 6 +- .../beans/XMLEncoder/java_awt_ScrollPane.java | 6 +- .../java_awt_geom_AffineTransform.java | 6 +- .../XMLEncoder/java_beans_EventHandler.java | 6 +- .../XMLEncoder/java_beans_Expression.java | 6 +- .../XMLEncoder/java_beans_Statement.java | 6 +- .../beans/XMLEncoder/java_lang_Character.java | 6 +- .../beans/XMLEncoder/java_lang_Class.java | 6 +- .../java/beans/XMLEncoder/java_lang_Enum.java | 6 +- .../beans/XMLEncoder/java_lang_String.java | 6 +- .../XMLEncoder/java_lang_reflect_Field.java | 6 +- .../XMLEncoder/java_lang_reflect_Method.java | 6 +- .../java/beans/XMLEncoder/java_net_URI.java | 6 +- .../java/beans/XMLEncoder/java_sql_Date.java | 6 +- .../java/beans/XMLEncoder/java_sql_Time.java | 6 +- .../beans/XMLEncoder/java_sql_Timestamp.java | 6 +- .../beans/XMLEncoder/java_util_ArrayList.java | 6 +- .../java_util_Collections_EmptyList.java | 6 +- .../java_util_Collections_EmptyMap.java | 6 +- .../java_util_Collections_EmptySet.java | 6 +- .../java_util_Collections_SingletonList.java | 6 +- .../java_util_Collections_SingletonMap.java | 6 +- .../java_util_Collections_SingletonSet.java | 6 +- ...il_Collections_SynchronizedCollection.java | 6 +- ...ava_util_Collections_SynchronizedList.java | 6 +- ...java_util_Collections_SynchronizedMap.java | 6 +- ...lections_SynchronizedRandomAccessList.java | 6 +- ...java_util_Collections_SynchronizedSet.java | 6 +- ...til_Collections_SynchronizedSortedMap.java | 6 +- ...til_Collections_SynchronizedSortedSet.java | 6 +- ...il_Collections_UnmodifiableCollection.java | 6 +- ...ava_util_Collections_UnmodifiableList.java | 6 +- ...java_util_Collections_UnmodifiableMap.java | 6 +- ...lections_UnmodifiableRandomAccessList.java | 6 +- ...java_util_Collections_UnmodifiableSet.java | 6 +- ...til_Collections_UnmodifiableSortedMap.java | 6 +- ...til_Collections_UnmodifiableSortedSet.java | 6 +- .../java/beans/XMLEncoder/java_util_Date.java | 6 +- .../beans/XMLEncoder/java_util_HashMap.java | 6 +- .../beans/XMLEncoder/javax_swing_Box.java | 6 +- .../XMLEncoder/javax_swing_BoxLayout.java | 6 +- .../XMLEncoder/javax_swing_Box_Filler.java | 6 +- .../javax_swing_DefaultCellEditor.java | 6 +- .../beans/XMLEncoder/javax_swing_JButton.java | 6 +- .../XMLEncoder/javax_swing_JComponent.java | 6 +- .../XMLEncoder/javax_swing_JLayeredPane.java | 6 +- .../XMLEncoder/javax_swing_JSplitPane.java | 6 +- .../beans/XMLEncoder/javax_swing_JTree.java | 6 +- .../XMLEncoder/javax_swing_KeyStroke.java | 6 +- .../XMLEncoder/javax_swing_OverlayLayout.java | 6 +- .../javax_swing_border_BevelBorder.java | 6 +- .../javax_swing_border_CompoundBorder.java | 6 +- .../javax_swing_border_EmptyBorder.java | 6 +- .../javax_swing_border_EtchedBorder.java | 6 +- .../javax_swing_border_LineBorder.java | 6 +- .../javax_swing_border_MatteBorder.java | 6 +- .../javax_swing_border_SoftBevelBorder.java | 6 +- .../javax_swing_border_StrokeBorder.java | 6 +- .../javax_swing_border_TitledBorder.java | 6 +- ...orderUIResource_BevelBorderUIResource.java | 6 +- ...erUIResource_CompoundBorderUIResource.java | 7 +- ...orderUIResource_EmptyBorderUIResource.java | 6 +- ...rderUIResource_EtchedBorderUIResource.java | 6 +- ...BorderUIResource_LineBorderUIResource.java | 6 +- ...orderUIResource_MatteBorderUIResource.java | 6 +- ...rderUIResource_TitledBorderUIResource.java | 6 +- .../javax_swing_plaf_ColorUIResource.java | 6 +- .../javax_swing_plaf_FontUIResource.java | 6 +- .../javax_swing_tree_DefaultTreeModel.java | 6 +- .../XMLEncoder/javax_swing_tree_TreePath.java | 6 +- .../sun_swing_PrintColorUIResource.java | 6 +- test/jdk/java/foreign/TestLinker.java | 5 +- test/jdk/java/foreign/security.policy | 7 - .../java/io/Console/SecurityManagerTest.java | 35 - test/jdk/java/io/Console/test.policy | 3 - test/jdk/java/io/File/CheckPermission.java | 380 --- test/jdk/java/io/File/GetXSpace.java | 111 +- .../io/File/createTempFile/SecurityTest.java | 47 - .../java/io/File/createTempFile/java.policy | 2 - .../jdk/java/io/FilePermission/MergeName.java | 91 - .../io/FilePermission/ReadFileOnPath.java | 93 - .../java/io/FilePermission/m/module-info.java | 3 - test/jdk/java/io/FilePermission/m/p/App.java | 44 - .../AuditStreamSubclass.java | 85 +- .../records/AbsentStreamValuesTest.java | 3 +- .../Serializable/records/BasicRecordSer.java | 3 +- .../records/ConstructorAccessTest.java | 3 +- .../records/ConstructorPermissionTest.java | 138 - .../io/Serializable/records/CycleTest.java | 3 +- .../records/DifferentStreamFieldsTest.java | 3 +- .../Serializable/records/ReadResolveTest.java | 4 +- .../Serializable/records/RecordClassTest.java | 3 +- .../records/SerialVersionUIDTest.java | 3 +- .../records/ThrowingConstructorTest.java | 3 +- .../records/WriteReplaceTest.java | 3 +- .../records/empty_security.policy | 25 - .../serialFilter/CheckInputOrderTest.java | 3 +- .../FilterWithSecurityManagerTest.java | 105 - .../serialFilter/GlobalFilterTest.java | 64 +- .../serialFilter/MixedFiltersTest.java | 2 +- .../serialFilter/SerialFilterFactoryTest.java | 80 +- .../Serializable/serialFilter/security.policy | 13 - .../security.policy.without.globalFilter | 9 - .../io/Serializable/subclass/Allow.policy | 9 - .../Serializable/subclass/SubclassTest.java | 20 +- .../Serializable/subclassGC/SubclassGC.java | 9 +- .../Serializable/subclassGC/security.policy | 8 - .../Class/forName/modules/TestDriver.java | 48 +- .../lang/Class/forName/modules/TestLayer.java | 12 +- .../java/lang/Class/forName/modules/policy | 7 - .../lang/Class/forName/modules/policy.denied | 11 - .../forName/modules/src/m3/module-info.java | 25 - .../forName/modules/src/m3/p3/NoAccess.java | 112 - .../src/m3/p3/NoGetClassLoaderAccess.java | 67 - .../modules/src/m3/p3/internal/Foo.java | 27 - .../ClassDeclaredFieldsTest.java | 159 +- .../FieldSetAccessibleTest.java | 184 +- ...closingConstructorWithSecurityManager.java | 50 - .../EnclosingMethodWithSecurityManager.java | 50 - .../jdk/java/lang/Class/getResource/Main.java | 13 +- .../lang/Class/getResource/ResourcesTest.java | 3 +- .../lang/ClassLoader/UninitializedParent.java | 69 - .../forNameLeak/ClassForNameLeak.java | 4 +- .../lang/ClassLoader/forNameLeak/test.policy | 7 - .../ClassLoader/getResource/modules/Main.java | 14 +- .../getResource/modules/ResourcesTest.java | 3 +- .../securityManager/ClassLoaderTest.java | 299 --- .../securityManager/TestClassLoader.java | 34 - .../securityManager/TestClient.java | 34 - .../securityManager/malformed.policy | 4 - .../ClassLoader/securityManager/valid.policy | 4 - .../lang/ModuleTests/WithSecurityManager.java | 145 -- test/jdk/java/lang/ModuleTests/allow.policy | 28 - test/jdk/java/lang/ProcessBuilder/Basic.java | 195 +- .../ProcessBuilder/SecurityManagerClinit.java | 91 - .../lang/ProcessHandle/PermissionTest.java | 245 -- .../lang/RuntimeTests/exec/ExecCommand.java | 97 +- test/jdk/java/lang/SecurityManager/Basic.java | 65 + .../CheckAccessClassInPackagePermissions.java | 128 - .../SecurityManager/CheckPackageAccess.java | 192 -- .../SecurityManager/CheckPackageMatching.java | 542 ---- .../CheckSecurityProvider.java | 9 +- .../SecurityManager/PackageAccessTest.java | 98 - .../java/lang/SecurityManager/empty.policy | 1 - .../modules/CustomSecurityManagerTest.java | 84 - .../modules/m/module-info.java | 25 - .../modules/m/p/CustomSecurityManager.java | 29 - .../lang/SecurityManager/modules/test.policy | 3 - .../jdk/java/lang/SecurityManager/test.policy | 3 - .../CallerSensitiveMethod/Main.java | 3 +- .../csm/jdk/test/CallerSensitiveTest.java | 25 +- .../lang/StackWalker/GetCallerClassTest.java | 21 +- .../lang/StackWalker/SecurityExceptions.java | 49 - .../java/lang/StackWalker/StackWalkTest.java | 4 +- .../lang/StackWalker/VerifyStackTrace.java | 10 +- test/jdk/java/lang/StackWalker/noperms.policy | 5 - .../java/lang/StackWalker/stackwalk.policy | 4 - .../lang/StackWalker/stackwalktest.policy | 5 - .../String/concat/WithSecurityManager.java | 79 - .../lang/System/AllowSecurityManager.java | 38 +- .../System/IgnoreNullSecurityManager.java | 37 - .../Logger/custom/CustomLoggerTest.java | 197 +- .../Logger/default/DefaultLoggerTest.java | 241 +- .../BaseLoggerFinderTest.java | 282 +-- .../DefaultLoggerFinderTest.java | 288 +-- .../BaseDefaultLoggerFinderTest.java | 222 +- .../BaseLoggerBridgeTest.java | 361 +-- .../BasePlatformLoggerTest.java | 226 +- .../BootstrapLogger/BootstrapLoggerTest.java | 228 +- .../LoggerBridgeTest/LoggerBridgeTest.java | 261 +- .../LoggerFinderLoaderTest.java | 209 +- .../PlatformLoggerBridgeTest.java | 237 +- .../DefaultLoggerBridgeTest.java | 307 +-- .../DefaultPlatformLoggerTest.java | 117 +- .../lang/System/SecurityManagerWarnings.java | 86 +- test/jdk/java/lang/System/SecurityRace.java | 202 -- test/jdk/java/lang/System/System.policy | 40 - .../lang/annotation/ParameterAnnotations.java | 40 +- .../CustomRepeatingWithSecurityManager.java | 110 - .../RepeatingWithSecurityManager.java | 67 - .../methodTypeDesc/ResolveConstantDesc.java | 107 - .../jdk.unsupported/sun/misc/Test.java | 31 - .../lang/constant/methodTypeDesc/test.policy | 6 - .../appendToClassLoaderSearch/run_tests.sh | 4 - .../lang/invoke/7196190/GetUnsafeTest.java | 111 - .../lang/invoke/7196190/jtreg.security.policy | 9 - .../java/lang/invoke/8076596/Test8076596.java | 48 - .../8076596/Test8076596.security.policy | 8 - .../lang/invoke/FindClassSecurityManager.java | 43 - .../lang/invoke/InvokeDynamicPrintArgs.java | 38 +- .../lang/invoke/MethodHandleConstants.java | 31 +- .../WithSecurityManagerTest.java | 68 - .../MethodHandleProxies/jtreg.security.policy | 9 - .../invoke/MethodTypeSecurityManager.java | 77 - .../java/lang/invoke/RevealDirectTest.java | 33 +- .../java/lang/invoke/TestPrivateMember.java | 64 - .../lang/invoke/callerSensitive/Main.java | 5 +- .../csm/jdk/test/MethodInvokeTest.java | 23 +- .../java/lang/invoke/getclassloader.policy | 10 - .../java/lang/invoke/jtreg.security.policy | 9 - .../LambdaAccessControlDoPrivilegedTest.java | 6 +- .../lambda/LambdaAccessControlTest.java | 48 - .../lambda/LogGeneratedClassesTest.java | 7 - .../ModuleFinderWithSecurityManager.java | 70 - test/jdk/java/lang/module/java.policy | 4 - .../reflect/Nestmates/TestReflectionAPI.java | 3 +- .../Nestmates/TestSecurityManagerChecks.java | 110 - .../java/lang/reflect/Nestmates/empty.policy | 5 - .../lang/reflect/Nestmates/testPkg/Host.java | 30 - .../reflect/Nestmates/testPkg/Singleton.java | 28 - .../nonPublicProxy/NonPublicProxyClass.java | 105 +- .../Proxy/nonPublicProxy/SimpleProxy.java | 18 +- .../lang/reflect/records/IsRecordTest.java | 3 +- .../records/RecordPermissionsTest.java | 212 -- .../reflect/records/RecordReflectionTest.java | 1 - .../reflect/records/allPermissions.policy | 27 - .../TestSecurityManagerChecks.java | 275 -- .../java/lang/runtime/ObjectMethodsTest.java | 3 +- test/jdk/java/lang/runtime/empty.policy | 26 - .../Authenticator/GetAuthenticatorTest.java | 16 +- .../net/DatagramSocket/ConnectPortZero.java | 46 +- .../java/net/DatagramSocket/SendPortZero.java | 39 +- .../net/DatagramSocket/TimeoutWithSM.java | 118 - .../net/IPSupport/MinimumPermissions.java | 40 - .../net/IPSupport/MinimumPermissions.policy | 29 - .../net/InetAddress/GetLocalHostWithSM.java | 89 - .../net/MulticastSocket/SendPortZero.java | 40 +- .../jdk/java/net/NetworkInterface/Equals.java | 6 +- .../net/ServerSocket/TestLocalAddress.java | 289 --- .../SetFactoryPermission.java | 88 - test/jdk/java/net/Socket/UdpSocket.java | 82 +- .../java/net/SocketOption/OptionsTest.java | 3 +- test/jdk/java/net/SocketOption/options.policy | 27 - .../SocketPermissionTest.java | 355 --- test/jdk/java/net/URL/OpenConnection.java | 5 +- test/jdk/java/net/URL/TestIPv6Addresses.java | 20 +- .../getresourceasstream/TestDriver.java | 15 - .../URLClassLoader/getresourceasstream/policy | 26 - test/jdk/java/net/URLPermission/OpenURL.java | 77 +- test/jdk/java/net/URLPermission/URLTest.java | 160 +- .../net/URLPermission/nstest/LookupTest.java | 51 +- .../net/httpclient/AsFileDownloadTest.java | 7 +- .../net/httpclient/AsFileDownloadTest.policy | 72 - .../net/httpclient/ConnectExceptionTest.java | 15 +- .../net/httpclient/DependentActionsTest.java | 4 +- .../DependentPromiseActionsTest.java | 12 +- .../FilePublisher/FilePublisherPermsTest.java | 104 +- .../FilePublisherPermsTest1.policy | 87 - .../FilePublisherPermsTest2.policy | 92 - .../FilePublisherPermsTest3.policy | 95 - .../FilePublisher/FilePublisherTest.java | 7 +- .../FilePublisher/FilePublisherTest.policy | 80 - .../httpclient/HttpClientLocalAddrTest.java | 11 +- .../BodyHandlerOfFileDownloadTest.java | 3 +- .../PathSubscriber/BodyHandlerOfFileTest.java | 4 +- .../BodySubscriberOfFileTest.java | 12 +- .../httpclient/PathSubscriber/ofFile.policy | 95 - .../PathSubscriber/ofFileDownload.policy | 92 - .../java/net/httpclient/RequestBodyTest.java | 14 +- .../net/httpclient/RequestBodyTest.policy | 62 - test/jdk/java/net/httpclient/dependent.policy | 74 - .../httpclient-localaddr-security.policy | 70 - .../java/net/httpclient/noPermissions.policy | 24 - .../jdk/java/net/httpclient/security/0.policy | 47 - .../jdk/java/net/httpclient/security/1.policy | 46 - .../java/net/httpclient/security/10.policy | 45 - .../java/net/httpclient/security/11.policy | 53 - .../java/net/httpclient/security/12.policy | 53 - .../java/net/httpclient/security/14.policy | 46 - .../java/net/httpclient/security/15.policy | 49 - .../java/net/httpclient/security/16.policy | 47 - .../java/net/httpclient/security/17.policy | 47 - .../jdk/java/net/httpclient/security/2.policy | 46 - .../jdk/java/net/httpclient/security/3.policy | 46 - .../jdk/java/net/httpclient/security/4.policy | 49 - .../jdk/java/net/httpclient/security/5.policy | 46 - .../jdk/java/net/httpclient/security/6.policy | 46 - .../jdk/java/net/httpclient/security/7.policy | 47 - .../jdk/java/net/httpclient/security/8.policy | 46 - .../jdk/java/net/httpclient/security/9.policy | 46 - .../java/net/httpclient/security/Driver.java | 172 -- .../net/httpclient/security/Security.java | 554 ---- .../FileProcessorPermissionTest.java | 90 +- .../filePerms/SecurityBeforeFile.java | 18 +- .../security/filePerms/allpermissions.policy | 28 - .../security/filePerms/nopermissions.policy | 26 - .../websocket/security/WSSanityTest.java | 196 ++ .../security/WSURLPermissionTest.java | 581 ----- .../websocket/security/httpclient.policy | 27 - .../ResolvePermissionTest.java | 95 - .../RuntimePermissionTest.java | 102 - .../spi/URLStreamHandlerProvider/Basic.java | 10 - .../spi/URLStreamHandlerProvider/basic.policy | 27 - .../AsynchronousChannelGroup/AsExecutor.java | 32 +- .../bootlib/Attack.java | 64 - .../bootlib/PrivilegedThreadFactory.java | 50 - .../WithSecurityManager.java | 76 - .../java.policy.allow | 3 - .../java.policy.deny | 3 - .../DatagramChannel/ConnectPortZero.java | 49 +- .../DatagramChannel/SendPortZero.java | 49 +- .../FileChannel/MapWithSecurityManager.java | 43 - .../InheritedChannelTest.java | 23 +- .../inheritedChannel/StateTestService.java | 9 +- .../inheritedChannel/java.policy.fail | 11 - .../inheritedChannel/java.policy.pass | 11 - .../nio/channels/unixdomain/Security.java | 203 -- test/jdk/java/nio/channels/unixdomain/policy1 | 26 - test/jdk/java/nio/channels/unixdomain/policy2 | 28 - test/jdk/java/nio/channels/unixdomain/policy3 | 28 - .../charset/spi/CharsetProviderBasicTest.java | 21 +- .../java/nio/charset/spi/charsetProvider.sp | 5 - test/jdk/java/nio/charset/spi/default-pol | 39 - .../java/nio/file/Files/CheckPermissions.java | 792 ------ .../nio/file/Files/CopyToNonDefaultFS.java | 4 +- .../java/nio/file/Files/FaultyFileSystem.java | 10 +- test/jdk/java/nio/file/Files/StreamTest.java | 151 -- test/jdk/java/nio/file/Files/copy.policy | 4 - .../Files/walkFileTree/WalkWithSecurity.java | 129 - .../file/Files/walkFileTree/denyAll.policy | 3 - .../file/Files/walkFileTree/grantAll.policy | 5 - .../Files/walkFileTree/grantTopOnly.policy | 4 - .../java/nio/file/Path/MacToRealPath.policy | 4 - .../nio/file/Path/MacToRealPathWithSM.java | 89 - .../WatchService/WithSecurityManager.java | 84 - .../java/nio/file/WatchService/denyAll.policy | 3 - .../WatchService/grantDirAndOneLevel.policy | 5 - .../file/WatchService/grantDirAndTree.policy | 5 - .../nio/file/WatchService/grantDirOnly.policy | 4 - .../java/nio/file/spi/SetDefaultProvider.java | 18 +- test/jdk/java/nio/file/spi/fs.policy | 3 - .../CheckPackageAccess.java | 71 - test/jdk/java/rmi/dgc/VMID/CheckVMID.java | 7 +- test/jdk/java/rmi/dgc/VMID/security.policy | 10 - .../dgcImplInsulation/DGCImplInsulation.java | 113 - .../DGCImplInsulation_Stub.java | 38 - .../rmi/dgc/dgcImplInsulation/security.policy | 7 - .../AltSecurityManager.java | 134 - .../TestSecurityManager.java | 46 - .../registry.security.policy | 8 - .../altSecurityManager/rmid.security.policy | 5 - .../classPathCodebase/ClassPathCodebase.java | 11 +- .../registry.security.policy | 18 - .../classPathCodebase/security.policy | 29 - .../rmi/registry/readTest/CodebaseTest.java | 19 +- .../readTest/registry.security.policy | 12 - .../serialFilter/RegistryFilterTest.java | 4 +- .../rmi/registry/serialFilter/security.policy | 4 - .../reliability/benchmark/bench/rmi/Main.java | 21 +- .../benchmark/bench/rmi/policy.all | 3 - .../rmi/reliability/juicer/AppleUserImpl.java | 4 +- .../rmi/reliability/juicer/security.policy | 4 - .../DelegateBeforePermissionCheck.java | 70 - .../delegateBeforePermissionCheck/Foo.java | 25 - .../DelegateToContextLoader.java | 13 +- .../delegateToContextLoader/security.policy | 21 - .../DownloadArrayClass.java | 144 -- .../DownloadArrayClass_Stub.java | 94 - .../downloadArrayClass/Foo.java | 25 - .../downloadArrayClass/Receiver.java | 31 - .../downloadArrayClass/security.policy | 22 - .../RMIClassLoader/getClassLoader/Foo.java | 25 - .../getClassLoader/GetClassLoader.java | 134 - .../getClassLoader/security.policy | 19 - .../loadProxyClasses/LoadProxyClasses.java | 25 +- .../loadProxyClasses/security.policy | 22 - .../RMIClassLoader/spi/ContextInsulation.java | 85 - .../RMIClassLoader/spi/DefaultProperty.java | 47 +- .../server/RMIClassLoader/spi/Installed.java | 4 +- .../RMIClassLoader/spi/InvalidProperty.java | 6 +- .../server/RMIClassLoader/spi/Property.java | 4 +- .../RMIClassLoader/spi/TestProvider.java | 4 +- .../server/RMIClassLoader/spi/security.policy | 22 - .../useCodebaseOnly/UseCodebaseOnly.java | 10 +- .../useCodebaseOnly/security.policy | 26 - .../RMIClassLoader/useGetURLs/UseGetURLs.java | 8 +- .../RMIClassLoader/useGetURLs/security.policy | 18 - .../useSocketFactory/registry/HelloImpl.java | 4 +- .../registry/UseCustomSocketFactory.java | 8 +- .../useSocketFactory/registry/security.policy | 34 - .../useSocketFactory/unicast/EchoImpl.java | 4 +- .../unicast/UseCustomSocketFactory.java | 10 +- .../useSocketFactory/unicast/security.policy | 34 - .../server/RemoteObject/toStub/ToStub.java | 8 +- .../RemoteObject/toStub/security.policy | 4 - .../setLogPermission/SetLogPermission.java | 81 - .../setLogPermission/security.policy | 3 - .../useDynamicProxies/UseDynamicProxies.java | 10 +- .../useDynamicProxies/security.policy | 4 - .../UnreferencedContext.java | 8 +- .../clientStackTrace/ClientStackTrace.java | 7 +- .../server/clientStackTrace/security.policy | 8 - .../rmi/server/useCustomRef/UseCustomRef.java | 5 +- .../rmi/server/useCustomRef/security.policy | 25 - .../jdk/java/rmi/testlibrary/TestLibrary.java | 31 +- .../rmi/testlibrary/TestLoaderHandler.java | 696 +++++ .../transport/dgcDeadLock/DGCDeadLock.java | 5 +- .../dgcDeadLock/registry.security.policy | 27 - .../rmi/transport/dgcDeadLock/security.policy | 27 - .../readTimeout/ReadTimeoutTest.java | 8 +- .../rmi/transport/readTimeout/security.policy | 10 - .../CheckNullPermission.java | 45 - .../security/AccessController/DoPriv.java | 68 - .../AccessController/DoPrivAccomplice.java | 32 - .../DoPrivAccompliceTest.java | 116 - .../security/AccessController/DoPrivTest.java | 30 - .../AccessController/LimitedDoPrivileged.java | 215 -- .../LimitedDoPrivilegedWithNullPerms.java | 96 - .../LimitedDoPrivilegedWithThread.java | 108 - .../jdk/java/security/AccessController/policy | 4 - .../BasicPermission/NullOrEmptyName.java | 18 +- test/jdk/java/security/KeyRep/Serial.java | 1 - test/jdk/java/security/KeyRep/Serial.policy | 4 - .../java/security/KeyRep/SerialDSAPubKey.java | 4 +- .../security/KeyRep/SerialDSAPubKey.policy | 6 - test/jdk/java/security/KeyRep/SerialOld.java | 3 +- .../jdk/java/security/KeyRep/SerialOld.policy | 16 - .../Policy/Dynamic/DynamicPolicy.java | 97 - .../Policy/Dynamic/TestDynamicPolicy.java | 124 - .../java/security/Policy/Dynamic/setpolicy.jp | 8 - .../ExtensiblePolicyTest.java | 65 - .../ExtensiblePolicyTest1.policy | 4 - .../ExtensiblePolicyTest2.policy | 3 - .../ExtensiblePolicyTest3.policy | 5 - .../ExtensiblePolicyWithJarTest.java | 115 - .../ExtensiblePolicy/TVJar/TVPermission.java | 358 --- .../Policy/GetInstance/GetInstance.java | 248 -- .../Policy/GetInstance/GetInstance.policy | 28 - .../Policy/GetInstance/GetInstance.policyURL | 3 - .../GetInstance/GetInstancePolicySpi.java | 64 - .../GetInstance/GetInstanceProvider.java | 40 - .../GetInstance/GetInstanceSecurity.java | 62 - .../GetInstance/GetInstanceSecurity.policy | 6 - .../Policy/GetPermissions/JarURL.java | 51 - .../Policy/GetPermissions/JarURL.policy | 8 - .../Policy/PolicyProvider/CustomPolicy.java | 61 - .../PolicyProvider/UseSystemClassLoader.java | 95 - .../Policy/PolicyProvider/test.policy | 9 - test/jdk/java/security/Policy/Root/Root.java | 103 - .../jdk/java/security/Policy/Root/Root.policy | 3 - .../Policy/SignedJar/SignedJarTest.java | 190 -- .../Policy/SignedJar/SignedJarTest_1.policy | 10 - .../Policy/SignedJar/SignedJarTest_2.policy | 11 - .../security/Policy/SignedJar/java.security | 3 - .../java/security/Policy/SignedJar/keypass | 1 - .../security/ProtectionDomain/AllPerm.jar | Bin 728 -> 0 bytes .../security/ProtectionDomain/AllPerm.java | 109 - .../ProtectionDomain/NullGetActions.java | 75 - .../ProtectionDomain/NullGetActions.policy | 3 - .../PreserveCombinerTest.java | 68 - .../security/ProtectionDomain/Recursion.java | 85 - .../ProtectionDomain/Recursion.policy | 6 - .../ProtectionDomain/RecursionDebug.java | 91 - .../SecureClassLoader/DefineClass.java | 303 --- .../SecureClassLoader/DefineClass.policy | 14 - .../java/security/Security/AddProvider.java | 59 - .../security/Security/AddProvider.policy.1 | 3 - .../security/Security/AddProvider.policy.2 | 5 - .../security/Security/AddProvider.policy.3 | 4 - .../SecurityPropFile/SecurityPropFile.java | 4 +- .../SecurityPropFile/SecurityPropFile.policy | 5 - .../removing/RemoveStaticProvider.java | 4 +- .../removing/RemoveStaticProvider.policy | 5 - .../security/UnresolvedPermission/Debug.java | 70 - .../UnresolvedPermission/Debug.policy | 6 - .../DebugPermission0.java | 45 - .../DebugPermission1.java | 45 - .../DebugPermission2.java | 45 - .../DebugPermissionBad.java | 45 - .../security/UnresolvedPermission/Equals.java | 53 - .../UnresolvedPermission/Equals.policy | 4 - .../cert/CertPathBuilder/GetInstance.java | 4 +- .../cert/CertPathBuilder/provider.policy | 8 - .../DriverManagerPermissionsTests.java | 161 -- .../java/time/chrono/Bug8178823.java | 37 - .../java/time/chrono/bug8178823.policy | 1 - .../util/PluggableLocale/PermissionTest.java | 80 - .../java/util/PluggableLocale/dummy.policy | 0 .../localeServiceProvider.policy | 3 - .../java/util/Properties/LoadAndStoreXML.java | 56 +- .../Properties/StoreReproducibilityTest.java | 100 +- .../java/util/ResourceBundle/Bug6359330.java | 53 - .../modules/security/TestPermission.java | 82 - .../modules/security/src/m1/module-info.java | 27 - .../modules/security/src/m1/p1/Bundle.java | 32 - .../src/m1/p1/resources/MyResources.java | 35 - .../security/src/test/jdk/test/Main.java | 64 - .../jdk/test/resources/TestResources.java | 35 - .../security/src/test/module-info.java | 26 - .../ServiceLoader/security/SecurityTest.java | 29 - .../security/test/module-info.java | 41 - .../ServiceLoader/security/test/p/Tests.java | 243 -- test/jdk/java/util/TimeZone/Bug6912560.java | 52 - .../util/TimeZone/SetDefaultSecurityTest.java | 65 - .../TimeZone/TimeZoneDatePermissionCheck.java | 40 - .../TimeZoneDatePermissionCheckRun.java | 108 - .../concurrent/BlockingQueue/LastElement.java | 4 +- .../Executors/PrivilegedCallables.java | 62 +- .../ThreadPoolExecutor/ConfigChanges.java | 12 +- .../ThreadPoolExecutor/ThrowingTasks.java | 12 +- .../concurrent/atomic/AtomicUpdaters.java | 99 +- .../tck/AbstractExecutorServiceTest.java | 9 +- .../concurrent/tck/CompletableFutureTest.java | 11 - .../util/concurrent/tck/ExecutorsTest.java | 185 +- .../concurrent/tck/ForkJoinPool9Test.java | 20 +- .../util/concurrent/tck/ForkJoinPoolTest.java | 6 +- .../util/concurrent/tck/FutureTaskTest.java | 46 - .../util/concurrent/tck/JSR166TestCase.java | 175 +- .../concurrent/tck/ThreadLocalRandomTest.java | 3 - .../java/util/concurrent/tck/ThreadTest.java | 14 +- test/jdk/java/util/concurrent/tck/tck.policy | 18 - .../AnonymousLogger/TestAnonymousLogger.java | 133 - .../util/logging/FileHandlerLongLimit.java | 254 +- .../java/util/logging/FileHandlerPath.java | 224 +- .../logging/FileHandlerPatternExceptions.java | 216 +- .../java/util/logging/HandlersConfigTest.java | 14 +- .../ParentLoggerWithHandlerGC.java | 158 +- .../Configuration/TestConfigurationLock.java | 30 +- .../BadRootLoggerHandlers.java | 6 +- .../RootLoggerHandlers.java | 4 +- .../rootLoggerHandlers/test.policy | 13 - .../HandlersOnComplexResetUpdate.java | 161 +- .../HandlersOnComplexUpdate.java | 161 +- ...SimpleUpdateConfigWithInputStreamTest.java | 199 +- .../SimpleUpdateConfigurationTest.java | 212 +- .../UpdateConfigurationTest.java | 188 +- .../setLevel/TestRootLoggerLevel.java | 53 +- .../Logger/getGlobal/TestGetGlobal.java | 10 +- .../Logger/getGlobal/TestGetGlobalByName.java | 8 +- .../getGlobal/TestGetGlobalConcurrent.java | 11 +- .../java/util/logging/Logger/getGlobal/policy | 8 - .../logging/Logger/getLogger/TestLogger.java | 8 +- .../TestSetResourceBundle.java | 138 +- .../RootLogger/RootLevelInConfigFile.java | 72 +- .../util/logging/SystemLoggerConfigTest.java | 84 +- .../logging/TestConfigurationListeners.java | 221 +- .../java/util/logging/TestGetLoggerNPE.java | 16 +- .../logging/TestLogConfigurationDeadLock.java | 28 +- .../TestLogConfigurationDeadLockWithConf.java | 34 +- .../util/logging/TestLoggerBundleSync.java | 24 +- .../TestLoggingWithMainAppContext.java | 8 +- .../java/util/logging/TestMainAppContext.java | 5 +- ...rContext.java => TestUILoggerContext.java} | 135 +- .../modules/GetResourceBundleTest.java | 18 +- .../UserDefaultControlTest.java | 39 +- test/jdk/java/util/spi/ToolProviderTest.java | 36 +- .../accessibilityProvider.sp | 4 - .../AccessibilityProvider/basic.sh | 11 +- .../CachePermissionsTest.java | 103 +- .../imageio/CachePremissionsTest/rw.policy | 5 - .../imageio/CachePremissionsTest/rwd.policy | 5 - .../imageio/CachePremissionsTest/w.policy | 5 - .../TestClassPathPlugin.sh | 16 +- .../BadPluginConfigurationTest.sh | 23 +- .../spi/AppletContextTest/IIOPluginTest.java | 22 +- .../ImplVersionTest.java | 6 +- .../management/ImplementationVersion/policy | 5 - .../Introspector/AnnotationSecurityTest.java | 164 -- .../AnnotationSecurityTest.policy | 15 - .../GetAllDescriptorsTest.java | 4 +- .../SimpleModelMBeanCommand.java | 4 +- .../modelmbean/SimpleModelMBean/policy | 14 - .../management/monitor/StartStopTest.java | 6 - .../management/monitor/ThreadPoolAccTest.java | 9 +- test/jdk/javax/management/monitor/all.policy | 3 - .../mandatory/loading/RMIDownloadTest.java | 41 +- .../mandatory/notif/NoPermToRemoveTest.java | 187 -- .../NotificationAccessControllerTest.java | 1 - .../notif/NotificationEmissionTest.java | 5 - .../remote/mandatory/notif/policy.negative | 7 - .../remote/mandatory/notif/policy.positive | 7 - .../NonJMXPrincipalsTest.java | 1 - .../PasswordAccessFileTest.java | 1 - .../passwordAuthenticator/RMIAltAuthTest.java | 2 - .../RMIPasswdAuthTest.java | 2 - .../passwordAuthenticator/SimpleStandard.java | 5 +- .../mandatory/version/ImplVersionTest.java | 7 +- .../remote/mandatory/version/policy | 3 - .../security/AuthorizationTest.java | 14 - .../security/java.policy.authorization | 88 - .../ssl/finalize/SSLSessionFinalizeTest.java | 3 +- .../javax/net/ssl/finalize/security.policy | 13 - .../script/JDK_8196959/BadFactoryTest.java | 3 +- test/jdk/javax/script/ProviderTest.sh | 9 +- .../MoreThenOnePrincipals.java | 99 - .../MoreThenOnePrincipals.policy | 10 - .../PrivateCredentialPermission/Serial.java | 3 +- .../PrivateCredentialPermission/Serial.policy | 5 - .../PrivateCredentialPermission/Subset.java | 612 ----- .../PrivateCredentialPermission/Subset.policy | 10 - .../auth/Subject/CallAsWithScopedValue.java | 3 +- .../javax/security/auth/Subject/Compat.java | 128 - .../security/auth/Subject/CurrentSubject.java | 3 +- .../security/auth/Subject/Exceptions.java | 4 +- .../javax/security/auth/Subject/FromACC.java | 62 - .../javax/security/auth/Subject/Serial.java | 22 +- .../javax/security/auth/Subject/Serial.policy | 5 - .../javax/security/auth/Subject/Synch2.java | 4 +- .../javax/security/auth/Subject/Synch2.policy | 3 - .../security/auth/Subject/UnsupportedSV.java | 73 - .../auth/Subject/doAs/NestedActions.java | 542 ---- .../security/auth/Subject/doAs/Test.java | 66 - .../javax/security/auth/Subject/doAs/policy | 10 - .../auth/Subject/doAs/policy.expect.ace | 27 - .../auth/Subject/doAs/policy.expect.pae | 19 - .../auth/Subject/doAs/policy.one.principal | 36 - .../auth/Subject/doAs/policy.two.principals | 37 - .../SubjectDomainCombiner/Regression.java | 14 +- .../SubjectDomainCombiner/Regression.policy | 12 - .../GetInstanceSecurity.grantedPolicy | 8 - .../Configuration/GetInstanceSecurity.java | 110 - .../Configuration/GetInstanceSecurity.policy | 15 - .../login/LoginContext/ConfigConstructor.java | 71 +- .../LoginContext/ConfigConstructor.policy | 7 - .../LoginContext/ConfigConstructorNoPerm.java | 134 - .../ConfigConstructorNoPerm.policy | 3 - .../smartcardio/TerminalFactorySpiTest.java | 4 +- test/jdk/javax/smartcardio/policy | 4 - .../DefaultProperties/DefaultProperties.java | 5 +- .../DefaultPropertiesNegative.java | 79 - .../MidiSystem/DefaultProperties/java.policy | 10 - .../DefaultProperties/negative.policy | 5 - ...Exception.java => EmptySoundBankTest.java} | 7 +- .../security.policy | 4 - .../DefaultProperties/DefaultProperties.java | 166 -- .../DefaultPropertiesNegative.java | 78 - .../AudioSystem/DefaultProperties/java.policy | 10 - .../DefaultProperties/negative.policy | 5 - .../testdata/conf/sound.properties | 27 - .../SyncFactoryPermissionsTests.java | 183 -- .../8080972/TestBasicComboBoxEditor.java | 9 +- .../swing/JEditorPane/5076514/bug5076514.java | 65 - .../JEditorPane/8080972/TestJEditor.java | 23 +- .../JFileChooser/6484091/bug6484091.java | 61 - .../JFileChooser/6570445/bug6570445.java | 44 - .../JFileChooser/6738668/bug6738668.java | 58 - .../JFileChooser/6738668/security.policy | 5 - .../JFileChooser/7036025/bug7036025.java | 62 - .../JFileChooser/7036025/security.policy | 5 - .../JFileChooser/8062561/bug8062561.java | 215 -- .../JFileChooser/8062561/security.policy | 5 - .../JFileChooser/8062561/security2.policy | 1 - ...ShellFolderQueriesSecurityManagerTest.java | 59 - .../shellfolderqueries.policy | 5 - .../8080972/TestDefaultFormatter.java | 7 +- .../swing/JOptionPane/8081019/bug8081019.java | 12 +- .../swing/JPopupMenu/6675802/bug6675802.java | 43 - .../swing/JPopupMenu/6691503/bug6691503.java | 116 - .../swing/JPopupMenu/6694823/bug6694823.java | 135 - .../JTable/8080972/TestJTableCellEditor.java | 8 +- .../swing/UIDefaults/6622002/bug6622002.java | 30 +- .../swing/UIDefaults/6795356/TableTest.java | 12 +- .../8080972/TestProxyLazyValue.java | 8 +- .../dnd/8080972/TestTransferHandler.java | 7 +- .../8080972/TestAbstractRegionPainter.java | 7 +- .../javax/swing/plaf/synth/Test8043627.java | 40 - .../text/View/8080972/TestObjectView.java | 7 +- test/jdk/javax/swing/text/rtf/bug4178276.java | 55 - .../crypto/dsig/ErrorHandlerPermissions.java | 119 - .../dsig/ErrorHandlerPermissions.policy | 5 - ...issions.java => ResolveReferenceURIs.java} | 30 +- .../SecurityManager/XMLDSigWithSecMgr.java | 157 -- .../xml/crypto/dsig/SecurityManager/policy | 3 - .../dsig/TransformService/NullParent.java | 3 +- .../crypto/dsig/TransformService/test.policy | 3 - .../crypto/dsig/keyinfo/KeyInfo/Marshal.java | 4 +- .../crypto/dsig/keyinfo/KeyInfo/test.policy | 3 - .../jaxp/common/8020430/JAXP15RegTest.java | 39 +- .../xml/jaxp/common/8020430/TestBase.java | 95 - .../parsers/8021148/JAXPSAXParserTest.java | 38 +- .../xml/jaxp/parsers/8021148/TestBase.java | 95 - .../xml/jaxp/parsers/8022548/TestBase.java | 73 - .../jaxp/parsers/8022548/XOMParserTest.java | 58 +- .../xml/jaxp/testng/validation/BaseTest.java | 57 +- .../xml/jaxp/transform/8004476/TestBase.java | 22 +- .../transform/8004476/XPathExFuncTest.java | 94 +- .../transform/8004476/XSLTExFuncTest.java | 81 +- test/jdk/jdk/dynalink/BeanLinkerTest.java | 54 +- .../TrustedDynamicLinkerFactoryTest.java | 4 +- .../UntrustedDynamicLinkerFactoryTest.java | 48 - test/jdk/jdk/dynalink/trusted.security.policy | 7 - .../jdk/dynalink/untrusted.security.policy | 3 - test/jdk/jdk/incubator/vector/VectorRuns.java | 3 +- .../incubator/vector/empty_security.policy | 25 - .../internal/jrtfs/WithSecurityManager.java | 93 - test/jdk/jdk/internal/jrtfs/java.policy | 3 - .../jfr/api/consumer/TestHiddenMethod.java | 50 +- .../recordingstream/TestOnErrorAsync.java | 6 +- .../recordingstream/TestOnErrorSync.java | 6 +- .../security/DriverRecordingDumper.java | 47 - .../security/TestMissingPermission.java | 68 - .../consumer/security/TestRecordingFile.java | 53 - .../security/TestRecordingStream.java | 58 - .../consumer/security/TestStreamingFile.java | 53 - .../consumer/security/TestStreamingLocal.java | 68 - .../security/TestStreamingRemote.java | 113 - .../consumer/security/local-streaming.policy | 4 - .../consumer/security/no-permission.policy | 3 - .../jmx/security/TestEnoughPermission.java | 103 - .../jmx/security/TestNoControlPermission.java | 71 - .../jmx/security/TestNoMonitorPermission.java | 63 - .../TestNotificationListenerPermission.java | 85 - test/jdk/jdk/jfr/jmx/security/enough.policy | 19 - test/jdk/jdk/jfr/jmx/security/listener.policy | 11 - .../jdk/jdk/jfr/jmx/security/nocontrol.policy | 11 - .../jdk/jdk/jfr/jmx/security/nomonitor.policy | 11 - .../jdk/jfr/startupargs/TestDumpOnExit.java | 21 +- test/jdk/jdk/nio/zipfs/Basic.java | 3 +- .../jdk/nio/zipfs/DirectoryStreamTests.java | 3 +- .../jdk/nio/zipfs/InvalidZipHeaderTests.java | 3 +- .../jdk/jdk/nio/zipfs/NewFileSystemTests.java | 3 +- test/jdk/jdk/nio/zipfs/PathOps.java | 4 +- .../nio/zipfs/PropertyPermissionTests.java | 4 +- .../jdk/nio/zipfs/PropertyPermissions.policy | 4 - test/jdk/jdk/nio/zipfs/TestPosix.java | 2 +- test/jdk/jdk/nio/zipfs/ZFSTests.java | 4 +- .../jdk/nio/zipfs/ZipFSPermissionsTest.java | 3 +- .../jdk/nio/zipfs/ZipFSPermissionsTest.policy | 5 - test/jdk/jdk/nio/zipfs/ZipFSTester.java | 4 +- test/jdk/jdk/nio/zipfs/test.policy | 7 - test/jdk/jdk/nio/zipfs/test.policy.posix | 9 - test/jdk/jdk/nio/zipfs/test.policy.readonly | 6 - .../jmxremote/bootstrap/RmiBootstrapTest.java | 2 - .../www/http/HttpClient/IsKeepingAlive.java | 69 - .../www/http/HttpClient/IsKeepingAlive.policy | 37 - .../net/www/http/HttpClient/OpenServer.java | 68 - .../net/www/http/HttpClient/OpenServer.policy | 37 - ...AuthWithSM.java => BasicNTLMAuthTest.java} | 12 +- .../HttpURLConnection/NTLMAuthWithSM.policy | 7 - .../www/protocol/jrt/WithSecurityManager.java | 72 - test/jdk/sun/net/www/protocol/jrt/java.policy | 3 - test/jdk/sun/nio/cs/StrCodingBenchmark.java | 12 +- test/jdk/sun/nio/cs/StrCodingBenchmarkDB.java | 5 +- test/jdk/sun/nio/cs/TestSJIS0213_SM.java | 38 - test/jdk/sun/nio/cs/TestStringCoding.java | 88 +- test/jdk/sun/nio/cs/TestStringCodingUTF8.java | 12 +- .../ReflectionFactoryTest.java | 3 +- .../reflect/ReflectionFactory/security.policy | 11 - .../Log/checkLogging/CheckLogging.java | 20 +- .../MarshalForeignStub.java | 6 +- .../marshalForeignStub/security.policy | 14 - .../DisableMultiplexing.java | 71 - .../DisableMultiplexing_Stub.java | 38 - test/jdk/sun/security/ec/TestEC.java | 2 - test/jdk/sun/security/ec/TestEC.policy | 3 - .../security/krb5/auto/AcceptPermissions.java | 155 -- .../jdk/sun/security/krb5/auto/BasicProc.java | 48 +- .../krb5/auto/HttpNegotiateServer.java | 27 +- .../security/krb5/auto/KeyPermissions.java | 58 - .../PrincipalSystemPropTest.java | 8 +- .../principalSystemPropTest.policy | 22 - .../sun/security/mscapi/AccessKeyStore.java | 151 -- test/jdk/sun/security/mscapi/access.policy | 4 - test/jdk/sun/security/mscapi/noaccess.policy | 4 - .../security/pkcs11/Cipher/ReinitCipher.java | 3 +- .../pkcs11/Cipher/TestPKCS5PaddingError.java | 1 - .../security/pkcs11/Cipher/TestRSACipher.java | 1 - .../pkcs11/Cipher/TestRSACipherWrap.java | 1 - .../pkcs11/Cipher/TestRawRSACipher.java | 1 - .../pkcs11/Cipher/TestSymmCiphers.java | 1 - .../pkcs11/Cipher/TestSymmCiphersNoPad.java | 1 - .../KeyAgreement/IllegalPackageAccess.java | 97 - .../pkcs11/KeyAgreement/SupportedDHKeys.java | 3 +- .../security/pkcs11/KeyAgreement/TestDH.java | 1 - .../pkcs11/KeyAgreement/TestInterop.java | 1 - .../pkcs11/KeyAgreement/TestShort.java | 3 +- .../KeyAgreement/UnsupportedDHKeys.java | 3 +- .../pkcs11/KeyGenerator/DESParity.java | 3 +- .../KeyGenerator/HmacDefKeySizeTest.java | 3 +- .../pkcs11/KeyGenerator/TestKeyGenerator.java | 3 +- .../pkcs11/KeyPairGenerator/TestDH2048.java | 3 +- .../sun/security/pkcs11/KeyStore/Basic.java | 5 +- .../sun/security/pkcs11/KeyStore/Basic.policy | 23 - test/jdk/sun/security/pkcs11/Mac/MacKAT.java | 3 +- .../sun/security/pkcs11/Mac/MacSameTest.java | 3 +- .../sun/security/pkcs11/Mac/ReinitMac.java | 3 +- .../pkcs11/MessageDigest/DigestKAT.java | 3 +- .../pkcs11/MessageDigest/ReinitDigest.java | 1 - .../pkcs11/MessageDigest/TestCloning.java | 3 +- test/jdk/sun/security/pkcs11/PKCS11Test.java | 49 +- .../sun/security/pkcs11/Provider/Login.java | 7 +- .../sun/security/pkcs11/Provider/Login.policy | 14 - .../pkcs11/Provider/MultipleLogins.java | 26 +- .../pkcs11/Provider/MultipleLogins.sh | 3 - .../security/pkcs11/Secmod/AddPrivateKey.java | 12 +- .../pkcs11/Secmod/AddTrustedCert.java | 14 +- .../sun/security/pkcs11/Secmod/Crypto.java | 9 +- .../security/pkcs11/Secmod/GetPrivateKey.java | 12 +- .../pkcs11/Secmod/JksSetPrivateKey.java | 12 +- .../security/pkcs11/Secmod/LoadKeystore.java | 12 +- .../security/pkcs11/Secmod/TrustAnchors.java | 9 +- test/jdk/sun/security/pkcs11/Secmod/policy | 6 - .../security/pkcs11/SecureRandom/Basic.java | 3 +- .../pkcs11/Signature/ByteBuffers.java | 3 +- .../security/pkcs11/Signature/TestDSA.java | 3 +- .../pkcs11/Signature/TestDSAKeyLength.java | 1 - .../pkcs11/Signature/TestRSAKeyLength.java | 3 +- .../security/pkcs11/ec/ReadCertificates.java | 3 +- .../sun/security/pkcs11/ec/ReadPKCS12.java | 3 +- .../sun/security/pkcs11/ec/TestCurves.java | 3 +- test/jdk/sun/security/pkcs11/ec/TestECDH.java | 3 +- .../jdk/sun/security/pkcs11/ec/TestECDH2.java | 3 +- .../jdk/sun/security/pkcs11/ec/TestECDSA.java | 3 +- .../sun/security/pkcs11/ec/TestECDSA2.java | 3 +- .../sun/security/pkcs11/ec/TestECGenSpec.java | 3 +- .../security/pkcs11/ec/TestKeyFactory.java | 3 +- test/jdk/sun/security/pkcs11/ec/policy | 7 - test/jdk/sun/security/pkcs11/policy | 4 - test/jdk/sun/security/pkcs11/rsa/KeyWrap.java | 3 +- .../sun/security/pkcs11/rsa/TestCACerts.java | 3 +- .../security/pkcs11/rsa/TestCACerts.policy | 7 - .../security/pkcs11/rsa/TestKeyFactory.java | 3 +- .../pkcs11/rsa/TestKeyPairGenerator.java | 4 +- .../pkcs11/rsa/TestKeyPairGenerator.policy | 4 - .../rsa/TestP11KeyFactoryGetRSAKeySpec.java | 3 +- .../security/pkcs11/rsa/TestSignatures.java | 3 +- .../sun/security/pkcs11/rsa/rsakeys.ks.policy | 5 - .../pkcs11/sslecc/ClientJSSEServerJSSE.java | 4 +- test/jdk/sun/security/pkcs11/sslecc/policy | 9 - .../security/pkcs11/tls/TestKeyMaterial.java | 3 +- .../pkcs11/tls/TestLeadingZeroesP11.java | 3 +- .../security/pkcs11/tls/TestMasterSecret.java | 3 +- .../pkcs11/tls/TestMasterSecret.policy | 8 - test/jdk/sun/security/pkcs11/tls/TestPRF.java | 3 +- .../security/pkcs11/tls/TestPremaster.java | 3 +- test/jdk/sun/security/pkcs11/tls/policy | 5 - .../security/provider/PolicyFile/Alias.java | 73 - .../security/provider/PolicyFile/Alias.policy | 12 - .../provider/PolicyFile/AliasExpansion.java | 64 - .../provider/PolicyFile/AliasExpansion.policy | 22 - .../provider/PolicyFile/BadPolicyFile.java | 51 - .../provider/PolicyFile/BadPolicyFile.policy | 4 - .../provider/PolicyFile/CombinedPerms.java | 55 - .../provider/PolicyFile/CombinedPerms.policy | 3 - .../provider/PolicyFile/DefaultPolicy.java | 78 - .../provider/PolicyFile/EmailAddress.java | 92 - .../provider/PolicyFile/EmailAddress.policy | 9 - .../security/provider/PolicyFile/Extra.policy | 3 - .../GrantAllPermToExtWhenNoPolicy.java | 52 - .../GrantAllPermToExtWhenNoPolicy.sh | 98 - .../security/provider/PolicyFile/Modules.java | 123 - .../provider/PolicyFile/SelfExpansion.java | 59 - .../provider/PolicyFile/SelfExpansion.policy | 10 - .../provider/PolicyFile/SelfWildcard.java | 78 - .../provider/PolicyFile/SelfWildcard.policy | 23 - .../PolicyFile/SomeExtensionClass.java | 38 - .../PolicyFile/TokenStore.RelPassPolicy | 6 - .../provider/PolicyFile/TokenStore.java | 262 -- .../provider/PolicyFile/TokenStore.keystore | Bin 2202 -> 0 bytes .../provider/PolicyFile/TokenStore.pwd | 1 - .../provider/PolicyFile/TrustedCert.java | 57 - .../provider/PolicyFile/TrustedCert.keystore | Bin 1063 -> 0 bytes .../provider/PolicyFile/TrustedCert.keystore1 | Bin 656 -> 0 bytes .../provider/PolicyFile/TrustedCert.policy | 11 - .../security/provider/PolicyFile/Utf8.java | 36 - .../security/provider/PolicyFile/Utf8.policy | 3 - .../PolicyFile/WildcardPrincipalName.java | 94 - .../PolicyFile/getinstance/GetInstance.java | 40 - .../PolicyFile/getinstance/GetInstance.policy | 6 - .../getinstance/NoArgPermission.java | 26 - .../getinstance/OneArgPermission.java | 26 - .../TwoArgNullActionsPermission.java | 28 - .../getinstance/TwoArgPermission.java | 26 - .../PolicyFile/getinstance/getinstance.sh | 136 - .../provider/PolicyFile/modules.policy | 61 - .../provider/PolicyFile/wildcard.policy | 7 - .../AvoidPropertyExpansionExceptions.java | 46 - .../provider/PolicyParser/BogusGrants.java | 59 - .../provider/PolicyParser/EncodeURL.java | 110 - .../ExpansionErrorMisleading.java | 54 - .../ExpansionErrorMisleading.policy | 3 - .../provider/PolicyParser/ExtDirs.java | 52 - .../provider/PolicyParser/ExtDirs.policy | 4 - .../provider/PolicyParser/ExtDirs1.policy | 4 - .../provider/PolicyParser/ExtDirs2.policy | 4 - .../provider/PolicyParser/ExtDirs3.policy | 4 - .../provider/PolicyParser/ExtDirsA.java | 37 - .../provider/PolicyParser/ExtDirsA/a.jar | Bin 1432 -> 0 bytes .../provider/PolicyParser/ExtDirsB.java | 28 - .../provider/PolicyParser/ExtDirsB/b.jar | Bin 854 -> 0 bytes .../provider/PolicyParser/ExtDirsChange.java | 110 - .../PolicyParser/ExtDirsChange.policy | 17 - .../PolicyParser/ExtDirsDefaultPolicy.java | 71 - .../PolicyParser/PrincipalExpansionError.java | 126 - .../PrincipalExpansionError.policy | 21 - .../PolicyParser/PrincipalExpansionError.sh | 25 - .../PrincipalExpansionErrorAction.java | 35 - .../provider/PolicyParser/TokenStore.java | 247 -- .../PolicyParser/UnresolvedProperty.policy | 10 - .../provider/PolicyParser/p001.policy | 3 - .../provider/PolicyParser/p002.policy | 4 - .../provider/PolicyParser/p003.policy | 4 - .../provider/PolicyParser/p004.policy | 3 - .../SecureRandom/StrongSecureRandom.java | 1 - .../sun/security/smartcardio/TestChannel.java | 3 +- .../sun/security/smartcardio/TestControl.java | 3 +- .../sun/security/smartcardio/TestDefault.java | 3 +- .../sun/security/smartcardio/TestDirect.java | 3 +- test/jdk/sun/security/smartcardio/test.policy | 3 - .../SSLSocketImpl/NotifyHandshakeTest.java | 192 -- .../SSLSocketImpl/NotifyHandshakeTest.policy | 37 - .../ssl/SSLSocketImpl/NotifyHandshakeTest.sh | 99 - .../NotifyHandshakeTestHeyYou.java | 62 - .../multiRelease/MVJarSigningTest.java | 7 +- .../jarsigner/multiRelease/SignedJar.policy | 10 - .../security/util/DerInputBuffer/Allow.policy | 11 - .../util/FilePermCompat/CompatImpact.java | 277 -- .../security/util/FilePermCompat/Flag.java | 125 - .../security/util/FilePermCompat/flag.policy | 4 - .../sun/security/util/Resources/Format.java | 12 +- .../sun/security/util/Resources/Format.policy | 3 - .../sun/security/util/Resources/Usages.java | 9 +- .../customSysClassLoader/BootMessages.java | 4 +- .../customSysClassLoader/error.policy | 5 - .../util/Resources/early/EarlyResources.java | 58 - .../util/Resources/early/malformed.policy | 3 - .../security/x509/AVA/AVAEqualsHashCode.java | 3 +- test/jdk/sun/security/x509/AVA/Allow.policy | 11 - .../sun/util/locale/provider/Bug8152817.java | 55 - .../tools/jlink/JLinkToolProviderTest.java | 16 +- test/jdk/tools/jlink/SecurityTest.java | 47 - test/jdk/tools/jlink/toolprovider.policy | 2 - .../launcher/MainClassCantBeLoadedTest.java | 64 +- test/jdk/tools/launcher/MiscTests.java | 44 +- .../modules/basic/LauncherErrors.java | 20 +- .../basic/src/test2/jdk/test2/Main.java | 10 +- .../langtools/tools/doclint/tool/RunTest.java | 57 +- .../api/ToolProvider/ToolProviderTest.java | 62 - .../javac/launcher/SourceLauncherTest.java | 19 - .../javac/processing/6348193/T6348193.java | 51 +- test/lib/jdk/test/lib/process/Proc.java | 74 +- test/lib/jdk/test/whitebox/WhiteBox.java | 5 - .../reflect/ClazzWithSecurityManager.java | 60 - .../java/security/ProtectionDomainBench.java | 8 +- 1885 files changed, 5494 insertions(+), 65616 deletions(-) delete mode 100644 src/java.base/share/classes/sun/security/provider/PolicyFile.java delete mode 100644 src/java.base/share/classes/sun/security/provider/PolicySpiFile.java delete mode 100644 src/java.base/share/conf/security/java.policy delete mode 100644 src/java.base/share/lib/security/default.policy delete mode 100644 src/java.base/share/native/libjava/AccessController.c delete mode 100644 src/java.base/share/native/libjava/SecurityManager.c delete mode 100644 src/java.base/windows/lib/security/default.policy delete mode 100644 test/hotspot/jtreg/compiler/exceptions/ExceptionInInit.java delete mode 100644 test/hotspot/jtreg/compiler/jvmci/SecurityRestrictionsTest.java delete mode 100644 test/hotspot/jtreg/runtime/Nestmates/protectionDomain/Host.java delete mode 100644 test/hotspot/jtreg/runtime/Nestmates/protectionDomain/TestDifferentProtectionDomains.java delete mode 100644 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/TestDescription.java delete mode 100644 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/attach004.policy delete mode 100644 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/attach004Agent00.java delete mode 100644 test/hotspot/jtreg/vmTestbase/nsk/jvmti/AttachOnDemand/attach004/attach004Agent00.mf delete mode 100644 test/jaxp/javax/xml/jaxp/libs/jaxp/library/BasePolicy.java delete mode 100644 test/jaxp/javax/xml/jaxp/libs/jaxp/library/FilePolicy.java delete mode 100644 test/jaxp/javax/xml/jaxp/libs/jaxp/library/InternalAPIPolicy.java delete mode 100644 test/jaxp/javax/xml/jaxp/libs/jaxp/library/JAXPPolicyManager.java delete mode 100644 test/jaxp/javax/xml/jaxp/libs/jaxp/library/JAXPTestPolicy.java delete mode 100644 test/jaxp/javax/xml/jaxp/libs/jaxp/library/NetAccessPolicy.java delete mode 100644 test/jaxp/javax/xml/jaxp/unittest/catalog/CatalogAccessTest.java delete mode 100644 test/jaxp/javax/xml/jaxp/unittest/common/Bug7143711Test.java delete mode 100644 test/jdk/com/sun/crypto/provider/Cipher/AES/TestAESCiphers/testAES.policy delete mode 100644 test/jdk/com/sun/java/accessibility/util/8051626/Bug8051626.java delete mode 100644 test/jdk/com/sun/management/DiagnosticCommandMBean/DcmdMBeanPermissionsTest.java rename test/jdk/com/sun/net/httpserver/simpleserver/{SecurityManagerTest.java => RootDirPermissionsTest.java} (56%) delete mode 100644 test/jdk/com/sun/net/httpserver/simpleserver/SecurityManagerTestNoRead.policy delete mode 100644 test/jdk/com/sun/net/httpserver/simpleserver/SecurityManagerTestRead.policy delete mode 100644 test/jdk/com/sun/security/auth/login/ConfigFile/InnerClassConfig.policy delete mode 100644 test/jdk/com/sun/security/auth/login/ConfigFile/PropertyExpansion.policy delete mode 100644 test/jdk/com/sun/security/auth/module/LdapLoginModule/CheckConfigs.policy delete mode 100644 test/jdk/com/sun/security/auth/uphc.policy delete mode 100644 test/jdk/com/sun/tools/attach/PermissionTest.java delete mode 100644 test/jdk/com/sun/tools/attach/java.policy.allow delete mode 100644 test/jdk/com/sun/tools/attach/java.policy.deny delete mode 100644 test/jdk/java/awt/Debug/DumpOnKey/dump.policy delete mode 100644 test/jdk/java/awt/Desktop/DefaultPermissions/DefaultPermissions.java delete mode 100644 test/jdk/java/awt/Desktop/DefaultPermissions/java.policy delete mode 100644 test/jdk/java/awt/Desktop/SecurityTest/DesktopSecurityTest.java delete mode 100644 test/jdk/java/awt/Desktop/SecurityTest/desktop.policy delete mode 100644 test/jdk/java/awt/Dialog/ModalDialogPermission/ModalDialogPermission.java delete mode 100644 test/jdk/java/awt/Dialog/ModalDialogPermission/java.policy delete mode 100644 test/jdk/java/awt/EventDispatchThread/PropertyPermissionOnEDT/PropertyPermissionOnEDT.java delete mode 100644 test/jdk/java/awt/EventDispatchThread/PropertyPermissionOnEDT/java.policy delete mode 100644 test/jdk/java/awt/Focus/CloseDialogActivateOwnerTest/CloseDialogActivateOwnerTest.java delete mode 100644 test/jdk/java/awt/Focus/CloseDialogActivateOwnerTest/java.policy delete mode 100644 test/jdk/java/awt/FontClass/CreateFont/BigFont.java delete mode 100644 test/jdk/java/awt/FontClass/CreateFont/fileaccess/FontFile.java delete mode 100644 test/jdk/java/awt/FontClass/CreateFont/fileaccess/TestFontFile.sh delete mode 100644 test/jdk/java/awt/FontClass/FontAccess.java delete mode 100644 test/jdk/java/awt/FontClass/FontPrivilege.java delete mode 100644 test/jdk/java/awt/PrintJob/Security/SecurityDialogTest.java delete mode 100644 test/jdk/java/awt/PrintJob/Security/policy delete mode 100644 test/jdk/java/awt/Toolkit/SecurityTest/SecurityTest2.java delete mode 100644 test/jdk/java/awt/TrayIcon/SecurityCheck/FunctionalityCheck/tray.policy delete mode 100644 test/jdk/java/awt/TrayIcon/SecurityCheck/NoPermissionTest/NoPermissionTest.java delete mode 100644 test/jdk/java/awt/TrayIcon/SecurityCheck/NoPermissionTest/tray.policy delete mode 100644 test/jdk/java/awt/TrayIcon/SecurityCheck/PermissionTest/PermissionTest.java delete mode 100644 test/jdk/java/awt/TrayIcon/SecurityCheck/PermissionTest/tray.policy delete mode 100644 test/jdk/java/awt/color/LoadProfileWithSM.java delete mode 100644 test/jdk/java/awt/color/StandardProfileTest.java delete mode 100644 test/jdk/java/awt/color/StandardProfileTest.policy delete mode 100644 test/jdk/java/awt/dnd/DragInterceptorAppletTest/DragInterceptorAppletTest.java delete mode 100644 test/jdk/java/awt/dnd/DragInterceptorAppletTest/DragInterceptorFrame.java delete mode 100644 test/jdk/java/awt/dnd/DragInterceptorAppletTest/InterprocessMessages.java delete mode 100644 test/jdk/java/awt/dnd/DragInterceptorAppletTest/SourceFrame.java delete mode 100644 test/jdk/java/awt/event/KeyEvent/RegisterKeyStroke/policy delete mode 100644 test/jdk/java/awt/image/mlib/mlib.security.policy delete mode 100644 test/jdk/java/awt/print/PrintServicesSecurityManager.java delete mode 100644 test/jdk/java/awt/print/PrinterJob/CheckAccess.java delete mode 100644 test/jdk/java/awt/print/PrinterJob/GetUserNameTest.java delete mode 100644 test/jdk/java/awt/print/PrinterJob/GetUserNameTest.policy delete mode 100644 test/jdk/java/awt/security/Permissions.java delete mode 100644 test/jdk/java/awt/security/WarningWindowDisposeTest/WarningWindowDisposeCrashTest.java delete mode 100644 test/jdk/java/awt/security/WarningWindowDisposeTest/WarningWindowDisposeTest.java delete mode 100644 test/jdk/java/awt/security/WarningWindowDisposeTest/policy delete mode 100644 test/jdk/java/beans/Beans/Test4080522.java delete mode 100644 test/jdk/java/beans/EventHandler/Test6277246.java delete mode 100644 test/jdk/java/beans/EventHandler/Test6277266.java delete mode 100644 test/jdk/java/beans/Introspector/Test6277246.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestBooleanClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestBooleanType.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestByteClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestByteType.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestColorClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestDoubleClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestDoubleType.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestEnumClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestEnumSubclass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestFloatClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestFloatType.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestFontClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestIntegerClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestIntegerType.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestLongClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestLongType.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestShortClass.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestShortType.java delete mode 100644 test/jdk/java/beans/PropertyEditor/TestStringClass.java delete mode 100644 test/jdk/java/beans/SimpleBeanInfo/LoadingStandardIcons/java.policy delete mode 100644 test/jdk/java/beans/Statement/ClassForName/java.policy delete mode 100644 test/jdk/java/beans/Statement/Test6224433.java delete mode 100644 test/jdk/java/beans/XMLEncoder/4741757/TestSecurityManager.java delete mode 100644 test/jdk/java/foreign/security.policy delete mode 100644 test/jdk/java/io/Console/SecurityManagerTest.java delete mode 100644 test/jdk/java/io/Console/test.policy delete mode 100644 test/jdk/java/io/File/CheckPermission.java delete mode 100644 test/jdk/java/io/File/createTempFile/SecurityTest.java delete mode 100644 test/jdk/java/io/File/createTempFile/java.policy delete mode 100644 test/jdk/java/io/FilePermission/MergeName.java delete mode 100644 test/jdk/java/io/FilePermission/ReadFileOnPath.java delete mode 100644 test/jdk/java/io/FilePermission/m/module-info.java delete mode 100644 test/jdk/java/io/FilePermission/m/p/App.java delete mode 100644 test/jdk/java/io/Serializable/records/ConstructorPermissionTest.java delete mode 100644 test/jdk/java/io/Serializable/records/empty_security.policy delete mode 100644 test/jdk/java/io/Serializable/serialFilter/FilterWithSecurityManagerTest.java delete mode 100644 test/jdk/java/io/Serializable/serialFilter/security.policy delete mode 100644 test/jdk/java/io/Serializable/serialFilter/security.policy.without.globalFilter delete mode 100644 test/jdk/java/io/Serializable/subclass/Allow.policy delete mode 100644 test/jdk/java/io/Serializable/subclassGC/security.policy delete mode 100644 test/jdk/java/lang/Class/forName/modules/policy delete mode 100644 test/jdk/java/lang/Class/forName/modules/policy.denied delete mode 100644 test/jdk/java/lang/Class/forName/modules/src/m3/module-info.java delete mode 100644 test/jdk/java/lang/Class/forName/modules/src/m3/p3/NoAccess.java delete mode 100644 test/jdk/java/lang/Class/forName/modules/src/m3/p3/NoGetClassLoaderAccess.java delete mode 100644 test/jdk/java/lang/Class/forName/modules/src/m3/p3/internal/Foo.java delete mode 100644 test/jdk/java/lang/Class/getEnclosingConstructor/EnclosingConstructorWithSecurityManager.java delete mode 100644 test/jdk/java/lang/Class/getEnclosingMethod/EnclosingMethodWithSecurityManager.java delete mode 100644 test/jdk/java/lang/ClassLoader/UninitializedParent.java delete mode 100644 test/jdk/java/lang/ClassLoader/forNameLeak/test.policy delete mode 100644 test/jdk/java/lang/ClassLoader/securityManager/ClassLoaderTest.java delete mode 100644 test/jdk/java/lang/ClassLoader/securityManager/TestClassLoader.java delete mode 100644 test/jdk/java/lang/ClassLoader/securityManager/TestClient.java delete mode 100644 test/jdk/java/lang/ClassLoader/securityManager/malformed.policy delete mode 100644 test/jdk/java/lang/ClassLoader/securityManager/valid.policy delete mode 100644 test/jdk/java/lang/ModuleTests/WithSecurityManager.java delete mode 100644 test/jdk/java/lang/ModuleTests/allow.policy delete mode 100644 test/jdk/java/lang/ProcessBuilder/SecurityManagerClinit.java delete mode 100644 test/jdk/java/lang/ProcessHandle/PermissionTest.java create mode 100644 test/jdk/java/lang/SecurityManager/Basic.java delete mode 100644 test/jdk/java/lang/SecurityManager/CheckAccessClassInPackagePermissions.java delete mode 100644 test/jdk/java/lang/SecurityManager/CheckPackageAccess.java delete mode 100644 test/jdk/java/lang/SecurityManager/CheckPackageMatching.java delete mode 100644 test/jdk/java/lang/SecurityManager/PackageAccessTest.java delete mode 100644 test/jdk/java/lang/SecurityManager/empty.policy delete mode 100644 test/jdk/java/lang/SecurityManager/modules/CustomSecurityManagerTest.java delete mode 100644 test/jdk/java/lang/SecurityManager/modules/m/module-info.java delete mode 100644 test/jdk/java/lang/SecurityManager/modules/m/p/CustomSecurityManager.java delete mode 100644 test/jdk/java/lang/SecurityManager/modules/test.policy delete mode 100644 test/jdk/java/lang/SecurityManager/test.policy delete mode 100644 test/jdk/java/lang/StackWalker/SecurityExceptions.java delete mode 100644 test/jdk/java/lang/StackWalker/noperms.policy delete mode 100644 test/jdk/java/lang/StackWalker/stackwalk.policy delete mode 100644 test/jdk/java/lang/StackWalker/stackwalktest.policy delete mode 100644 test/jdk/java/lang/String/concat/WithSecurityManager.java delete mode 100644 test/jdk/java/lang/System/IgnoreNullSecurityManager.java delete mode 100644 test/jdk/java/lang/System/SecurityRace.java delete mode 100644 test/jdk/java/lang/System/System.policy delete mode 100644 test/jdk/java/lang/annotation/repeatingAnnotations/CustomRepeatingWithSecurityManager.java delete mode 100644 test/jdk/java/lang/annotation/repeatingAnnotations/RepeatingWithSecurityManager.java delete mode 100644 test/jdk/java/lang/constant/methodTypeDesc/ResolveConstantDesc.java delete mode 100644 test/jdk/java/lang/constant/methodTypeDesc/jdk.unsupported/sun/misc/Test.java delete mode 100644 test/jdk/java/lang/constant/methodTypeDesc/test.policy delete mode 100644 test/jdk/java/lang/invoke/7196190/GetUnsafeTest.java delete mode 100644 test/jdk/java/lang/invoke/7196190/jtreg.security.policy delete mode 100644 test/jdk/java/lang/invoke/8076596/Test8076596.java delete mode 100644 test/jdk/java/lang/invoke/8076596/Test8076596.security.policy delete mode 100644 test/jdk/java/lang/invoke/FindClassSecurityManager.java delete mode 100644 test/jdk/java/lang/invoke/MethodHandleProxies/WithSecurityManagerTest.java delete mode 100644 test/jdk/java/lang/invoke/MethodHandleProxies/jtreg.security.policy delete mode 100644 test/jdk/java/lang/invoke/MethodTypeSecurityManager.java delete mode 100644 test/jdk/java/lang/invoke/TestPrivateMember.java delete mode 100644 test/jdk/java/lang/invoke/getclassloader.policy delete mode 100644 test/jdk/java/lang/invoke/jtreg.security.policy delete mode 100644 test/jdk/java/lang/invoke/lambda/LambdaAccessControlTest.java delete mode 100644 test/jdk/java/lang/module/ModuleFinderWithSecurityManager.java delete mode 100644 test/jdk/java/lang/module/java.policy delete mode 100644 test/jdk/java/lang/reflect/Nestmates/TestSecurityManagerChecks.java delete mode 100644 test/jdk/java/lang/reflect/Nestmates/empty.policy delete mode 100644 test/jdk/java/lang/reflect/Nestmates/testPkg/Host.java delete mode 100644 test/jdk/java/lang/reflect/Nestmates/testPkg/Singleton.java delete mode 100644 test/jdk/java/lang/reflect/records/RecordPermissionsTest.java delete mode 100644 test/jdk/java/lang/reflect/records/allPermissions.policy delete mode 100644 test/jdk/java/lang/reflect/sealed_classes/TestSecurityManagerChecks.java delete mode 100644 test/jdk/java/lang/runtime/empty.policy delete mode 100644 test/jdk/java/net/DatagramSocket/TimeoutWithSM.java delete mode 100644 test/jdk/java/net/IPSupport/MinimumPermissions.java delete mode 100644 test/jdk/java/net/IPSupport/MinimumPermissions.policy delete mode 100644 test/jdk/java/net/InetAddress/GetLocalHostWithSM.java delete mode 100644 test/jdk/java/net/ServerSocket/TestLocalAddress.java delete mode 100644 test/jdk/java/net/SetFactoryPermission/SetFactoryPermission.java delete mode 100644 test/jdk/java/net/SocketOption/options.policy delete mode 100644 test/jdk/java/net/SocketPermission/SocketPermissionTest.java delete mode 100644 test/jdk/java/net/URLClassLoader/getresourceasstream/policy delete mode 100644 test/jdk/java/net/httpclient/AsFileDownloadTest.policy delete mode 100644 test/jdk/java/net/httpclient/FilePublisher/FilePublisherPermsTest1.policy delete mode 100644 test/jdk/java/net/httpclient/FilePublisher/FilePublisherPermsTest2.policy delete mode 100644 test/jdk/java/net/httpclient/FilePublisher/FilePublisherPermsTest3.policy delete mode 100644 test/jdk/java/net/httpclient/FilePublisher/FilePublisherTest.policy delete mode 100644 test/jdk/java/net/httpclient/PathSubscriber/ofFile.policy delete mode 100644 test/jdk/java/net/httpclient/PathSubscriber/ofFileDownload.policy delete mode 100644 test/jdk/java/net/httpclient/RequestBodyTest.policy delete mode 100644 test/jdk/java/net/httpclient/dependent.policy delete mode 100644 test/jdk/java/net/httpclient/httpclient-localaddr-security.policy delete mode 100644 test/jdk/java/net/httpclient/noPermissions.policy delete mode 100644 test/jdk/java/net/httpclient/security/0.policy delete mode 100644 test/jdk/java/net/httpclient/security/1.policy delete mode 100644 test/jdk/java/net/httpclient/security/10.policy delete mode 100644 test/jdk/java/net/httpclient/security/11.policy delete mode 100644 test/jdk/java/net/httpclient/security/12.policy delete mode 100644 test/jdk/java/net/httpclient/security/14.policy delete mode 100644 test/jdk/java/net/httpclient/security/15.policy delete mode 100644 test/jdk/java/net/httpclient/security/16.policy delete mode 100644 test/jdk/java/net/httpclient/security/17.policy delete mode 100644 test/jdk/java/net/httpclient/security/2.policy delete mode 100644 test/jdk/java/net/httpclient/security/3.policy delete mode 100644 test/jdk/java/net/httpclient/security/4.policy delete mode 100644 test/jdk/java/net/httpclient/security/5.policy delete mode 100644 test/jdk/java/net/httpclient/security/6.policy delete mode 100644 test/jdk/java/net/httpclient/security/7.policy delete mode 100644 test/jdk/java/net/httpclient/security/8.policy delete mode 100644 test/jdk/java/net/httpclient/security/9.policy delete mode 100644 test/jdk/java/net/httpclient/security/Driver.java delete mode 100644 test/jdk/java/net/httpclient/security/Security.java delete mode 100644 test/jdk/java/net/httpclient/security/filePerms/allpermissions.policy delete mode 100644 test/jdk/java/net/httpclient/security/filePerms/nopermissions.policy create mode 100644 test/jdk/java/net/httpclient/websocket/security/WSSanityTest.java delete mode 100644 test/jdk/java/net/httpclient/websocket/security/WSURLPermissionTest.java delete mode 100644 test/jdk/java/net/httpclient/websocket/security/httpclient.policy delete mode 100644 test/jdk/java/net/spi/InetAddressResolverProvider/ResolvePermissionTest.java delete mode 100644 test/jdk/java/net/spi/InetAddressResolverProvider/RuntimePermissionTest.java delete mode 100644 test/jdk/java/net/spi/URLStreamHandlerProvider/basic.policy delete mode 100644 test/jdk/java/nio/channels/AsynchronousChannelGroup/bootlib/Attack.java delete mode 100644 test/jdk/java/nio/channels/AsynchronousChannelGroup/bootlib/PrivilegedThreadFactory.java delete mode 100644 test/jdk/java/nio/channels/AsynchronousServerSocketChannel/WithSecurityManager.java delete mode 100644 test/jdk/java/nio/channels/AsynchronousServerSocketChannel/java.policy.allow delete mode 100644 test/jdk/java/nio/channels/AsynchronousServerSocketChannel/java.policy.deny delete mode 100644 test/jdk/java/nio/channels/FileChannel/MapWithSecurityManager.java delete mode 100644 test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/java.policy.fail delete mode 100644 test/jdk/java/nio/channels/spi/SelectorProvider/inheritedChannel/java.policy.pass delete mode 100644 test/jdk/java/nio/channels/unixdomain/Security.java delete mode 100644 test/jdk/java/nio/channels/unixdomain/policy1 delete mode 100644 test/jdk/java/nio/channels/unixdomain/policy2 delete mode 100644 test/jdk/java/nio/channels/unixdomain/policy3 delete mode 100644 test/jdk/java/nio/charset/spi/charsetProvider.sp delete mode 100644 test/jdk/java/nio/charset/spi/default-pol delete mode 100644 test/jdk/java/nio/file/Files/CheckPermissions.java delete mode 100644 test/jdk/java/nio/file/Files/copy.policy delete mode 100644 test/jdk/java/nio/file/Files/walkFileTree/WalkWithSecurity.java delete mode 100644 test/jdk/java/nio/file/Files/walkFileTree/denyAll.policy delete mode 100644 test/jdk/java/nio/file/Files/walkFileTree/grantAll.policy delete mode 100644 test/jdk/java/nio/file/Files/walkFileTree/grantTopOnly.policy delete mode 100644 test/jdk/java/nio/file/Path/MacToRealPath.policy delete mode 100644 test/jdk/java/nio/file/Path/MacToRealPathWithSM.java delete mode 100644 test/jdk/java/nio/file/WatchService/WithSecurityManager.java delete mode 100644 test/jdk/java/nio/file/WatchService/denyAll.policy delete mode 100644 test/jdk/java/nio/file/WatchService/grantDirAndOneLevel.policy delete mode 100644 test/jdk/java/nio/file/WatchService/grantDirAndTree.policy delete mode 100644 test/jdk/java/nio/file/WatchService/grantDirOnly.policy delete mode 100644 test/jdk/java/nio/file/spi/fs.policy delete mode 100644 test/jdk/java/rmi/RMISecurityManager/checkPackageAccess/CheckPackageAccess.java delete mode 100644 test/jdk/java/rmi/dgc/VMID/security.policy delete mode 100644 test/jdk/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation.java delete mode 100644 test/jdk/java/rmi/dgc/dgcImplInsulation/DGCImplInsulation_Stub.java delete mode 100644 test/jdk/java/rmi/dgc/dgcImplInsulation/security.policy delete mode 100644 test/jdk/java/rmi/registry/altSecurityManager/AltSecurityManager.java delete mode 100644 test/jdk/java/rmi/registry/altSecurityManager/TestSecurityManager.java delete mode 100644 test/jdk/java/rmi/registry/altSecurityManager/registry.security.policy delete mode 100644 test/jdk/java/rmi/registry/altSecurityManager/rmid.security.policy delete mode 100644 test/jdk/java/rmi/registry/classPathCodebase/registry.security.policy delete mode 100644 test/jdk/java/rmi/registry/classPathCodebase/security.policy delete mode 100644 test/jdk/java/rmi/registry/readTest/registry.security.policy delete mode 100644 test/jdk/java/rmi/registry/serialFilter/security.policy delete mode 100644 test/jdk/java/rmi/reliability/benchmark/bench/rmi/policy.all delete mode 100644 test/jdk/java/rmi/reliability/juicer/security.policy delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/delegateBeforePermissionCheck/DelegateBeforePermissionCheck.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/delegateBeforePermissionCheck/Foo.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/delegateToContextLoader/security.policy delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/downloadArrayClass/DownloadArrayClass_Stub.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/downloadArrayClass/Foo.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/downloadArrayClass/Receiver.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/downloadArrayClass/security.policy delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/getClassLoader/Foo.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/getClassLoader/GetClassLoader.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/getClassLoader/security.policy delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/loadProxyClasses/security.policy delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/spi/ContextInsulation.java delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/spi/security.policy delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/useCodebaseOnly/security.policy delete mode 100644 test/jdk/java/rmi/server/RMIClassLoader/useGetURLs/security.policy delete mode 100644 test/jdk/java/rmi/server/RMISocketFactory/useSocketFactory/registry/security.policy delete mode 100644 test/jdk/java/rmi/server/RMISocketFactory/useSocketFactory/unicast/security.policy delete mode 100644 test/jdk/java/rmi/server/RemoteObject/toStub/security.policy delete mode 100644 test/jdk/java/rmi/server/RemoteServer/setLogPermission/SetLogPermission.java delete mode 100644 test/jdk/java/rmi/server/RemoteServer/setLogPermission/security.policy delete mode 100644 test/jdk/java/rmi/server/UnicastRemoteObject/useDynamicProxies/security.policy delete mode 100644 test/jdk/java/rmi/server/clientStackTrace/security.policy delete mode 100644 test/jdk/java/rmi/server/useCustomRef/security.policy create mode 100644 test/jdk/java/rmi/testlibrary/TestLoaderHandler.java delete mode 100644 test/jdk/java/rmi/transport/dgcDeadLock/registry.security.policy delete mode 100644 test/jdk/java/rmi/transport/dgcDeadLock/security.policy delete mode 100644 test/jdk/java/rmi/transport/readTimeout/security.policy delete mode 100644 test/jdk/java/security/AccessControlContext/CheckNullPermission.java delete mode 100644 test/jdk/java/security/AccessController/DoPriv.java delete mode 100644 test/jdk/java/security/AccessController/DoPrivAccomplice.java delete mode 100644 test/jdk/java/security/AccessController/DoPrivAccompliceTest.java delete mode 100644 test/jdk/java/security/AccessController/DoPrivTest.java delete mode 100644 test/jdk/java/security/AccessController/LimitedDoPrivileged.java delete mode 100644 test/jdk/java/security/AccessController/LimitedDoPrivilegedWithNullPerms.java delete mode 100644 test/jdk/java/security/AccessController/LimitedDoPrivilegedWithThread.java delete mode 100644 test/jdk/java/security/AccessController/policy delete mode 100644 test/jdk/java/security/KeyRep/Serial.policy delete mode 100644 test/jdk/java/security/KeyRep/SerialDSAPubKey.policy delete mode 100644 test/jdk/java/security/KeyRep/SerialOld.policy delete mode 100644 test/jdk/java/security/Policy/Dynamic/DynamicPolicy.java delete mode 100644 test/jdk/java/security/Policy/Dynamic/TestDynamicPolicy.java delete mode 100644 test/jdk/java/security/Policy/Dynamic/setpolicy.jp delete mode 100644 test/jdk/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyTest.java delete mode 100644 test/jdk/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyTest1.policy delete mode 100644 test/jdk/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyTest2.policy delete mode 100644 test/jdk/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyTest3.policy delete mode 100644 test/jdk/java/security/Policy/ExtensiblePolicy/ExtensiblePolicyWithJarTest.java delete mode 100644 test/jdk/java/security/Policy/ExtensiblePolicy/TVJar/TVPermission.java delete mode 100644 test/jdk/java/security/Policy/GetInstance/GetInstance.java delete mode 100644 test/jdk/java/security/Policy/GetInstance/GetInstance.policy delete mode 100644 test/jdk/java/security/Policy/GetInstance/GetInstance.policyURL delete mode 100644 test/jdk/java/security/Policy/GetInstance/GetInstancePolicySpi.java delete mode 100644 test/jdk/java/security/Policy/GetInstance/GetInstanceProvider.java delete mode 100644 test/jdk/java/security/Policy/GetInstance/GetInstanceSecurity.java delete mode 100644 test/jdk/java/security/Policy/GetInstance/GetInstanceSecurity.policy delete mode 100644 test/jdk/java/security/Policy/GetPermissions/JarURL.java delete mode 100644 test/jdk/java/security/Policy/GetPermissions/JarURL.policy delete mode 100644 test/jdk/java/security/Policy/PolicyProvider/CustomPolicy.java delete mode 100644 test/jdk/java/security/Policy/PolicyProvider/UseSystemClassLoader.java delete mode 100644 test/jdk/java/security/Policy/PolicyProvider/test.policy delete mode 100644 test/jdk/java/security/Policy/Root/Root.java delete mode 100644 test/jdk/java/security/Policy/Root/Root.policy delete mode 100644 test/jdk/java/security/Policy/SignedJar/SignedJarTest.java delete mode 100644 test/jdk/java/security/Policy/SignedJar/SignedJarTest_1.policy delete mode 100644 test/jdk/java/security/Policy/SignedJar/SignedJarTest_2.policy delete mode 100644 test/jdk/java/security/Policy/SignedJar/java.security delete mode 100644 test/jdk/java/security/Policy/SignedJar/keypass delete mode 100644 test/jdk/java/security/ProtectionDomain/AllPerm.jar delete mode 100644 test/jdk/java/security/ProtectionDomain/AllPerm.java delete mode 100644 test/jdk/java/security/ProtectionDomain/NullGetActions.java delete mode 100644 test/jdk/java/security/ProtectionDomain/NullGetActions.policy delete mode 100644 test/jdk/java/security/ProtectionDomain/PreserveCombinerTest.java delete mode 100644 test/jdk/java/security/ProtectionDomain/Recursion.java delete mode 100644 test/jdk/java/security/ProtectionDomain/Recursion.policy delete mode 100644 test/jdk/java/security/ProtectionDomain/RecursionDebug.java delete mode 100644 test/jdk/java/security/SecureClassLoader/DefineClass.java delete mode 100644 test/jdk/java/security/SecureClassLoader/DefineClass.policy delete mode 100644 test/jdk/java/security/Security/AddProvider.java delete mode 100644 test/jdk/java/security/Security/AddProvider.policy.1 delete mode 100644 test/jdk/java/security/Security/AddProvider.policy.2 delete mode 100644 test/jdk/java/security/Security/AddProvider.policy.3 delete mode 100644 test/jdk/java/security/Security/SecurityPropFile/SecurityPropFile.policy delete mode 100644 test/jdk/java/security/Security/removing/RemoveStaticProvider.policy delete mode 100644 test/jdk/java/security/UnresolvedPermission/Debug.java delete mode 100644 test/jdk/java/security/UnresolvedPermission/Debug.policy delete mode 100644 test/jdk/java/security/UnresolvedPermission/DebugPermission0.java delete mode 100644 test/jdk/java/security/UnresolvedPermission/DebugPermission1.java delete mode 100644 test/jdk/java/security/UnresolvedPermission/DebugPermission2.java delete mode 100644 test/jdk/java/security/UnresolvedPermission/DebugPermissionBad.java delete mode 100644 test/jdk/java/security/UnresolvedPermission/Equals.java delete mode 100644 test/jdk/java/security/UnresolvedPermission/Equals.policy delete mode 100644 test/jdk/java/security/cert/CertPathBuilder/provider.policy delete mode 100644 test/jdk/java/sql/permissionTests/DriverManagerPermissionsTests.java delete mode 100644 test/jdk/java/time/nontestng/java/time/chrono/Bug8178823.java delete mode 100644 test/jdk/java/time/nontestng/java/time/chrono/bug8178823.policy delete mode 100644 test/jdk/java/util/PluggableLocale/PermissionTest.java delete mode 100644 test/jdk/java/util/PluggableLocale/dummy.policy delete mode 100644 test/jdk/java/util/PluggableLocale/localeServiceProvider.policy delete mode 100644 test/jdk/java/util/ResourceBundle/Bug6359330.java delete mode 100644 test/jdk/java/util/ResourceBundle/modules/security/TestPermission.java delete mode 100644 test/jdk/java/util/ResourceBundle/modules/security/src/m1/module-info.java delete mode 100644 test/jdk/java/util/ResourceBundle/modules/security/src/m1/p1/Bundle.java delete mode 100644 test/jdk/java/util/ResourceBundle/modules/security/src/m1/p1/resources/MyResources.java delete mode 100644 test/jdk/java/util/ResourceBundle/modules/security/src/test/jdk/test/Main.java delete mode 100644 test/jdk/java/util/ResourceBundle/modules/security/src/test/jdk/test/resources/TestResources.java delete mode 100644 test/jdk/java/util/ResourceBundle/modules/security/src/test/module-info.java delete mode 100644 test/jdk/java/util/ServiceLoader/security/SecurityTest.java delete mode 100644 test/jdk/java/util/ServiceLoader/security/test/module-info.java delete mode 100644 test/jdk/java/util/ServiceLoader/security/test/p/Tests.java delete mode 100644 test/jdk/java/util/TimeZone/Bug6912560.java delete mode 100644 test/jdk/java/util/TimeZone/SetDefaultSecurityTest.java delete mode 100644 test/jdk/java/util/TimeZone/TimeZoneDatePermissionCheck.java delete mode 100644 test/jdk/java/util/TimeZone/TimeZoneDatePermissionCheckRun.java delete mode 100644 test/jdk/java/util/concurrent/tck/tck.policy delete mode 100644 test/jdk/java/util/logging/AnonymousLogger/TestAnonymousLogger.java delete mode 100644 test/jdk/java/util/logging/LogManager/Configuration/rootLoggerHandlers/test.policy delete mode 100644 test/jdk/java/util/logging/Logger/getGlobal/policy rename test/jdk/java/util/logging/{TestAppletLoggerContext.java => TestUILoggerContext.java} (76%) delete mode 100644 test/jdk/javax/accessibility/AccessibilityProvider/accessibilityProvider.sp delete mode 100644 test/jdk/javax/imageio/CachePremissionsTest/rw.policy delete mode 100644 test/jdk/javax/imageio/CachePremissionsTest/rwd.policy delete mode 100644 test/jdk/javax/imageio/CachePremissionsTest/w.policy delete mode 100644 test/jdk/javax/management/ImplementationVersion/policy delete mode 100644 test/jdk/javax/management/Introspector/AnnotationSecurityTest.java delete mode 100644 test/jdk/javax/management/Introspector/AnnotationSecurityTest.policy delete mode 100644 test/jdk/javax/management/modelmbean/SimpleModelMBean/policy delete mode 100644 test/jdk/javax/management/monitor/all.policy delete mode 100644 test/jdk/javax/management/remote/mandatory/notif/NoPermToRemoveTest.java delete mode 100644 test/jdk/javax/management/remote/mandatory/notif/policy.negative delete mode 100644 test/jdk/javax/management/remote/mandatory/notif/policy.positive delete mode 100644 test/jdk/javax/management/remote/mandatory/version/policy delete mode 100644 test/jdk/javax/management/security/java.policy.authorization delete mode 100644 test/jdk/javax/net/ssl/finalize/security.policy delete mode 100644 test/jdk/javax/security/auth/PrivateCredentialPermission/MoreThenOnePrincipals.java delete mode 100644 test/jdk/javax/security/auth/PrivateCredentialPermission/MoreThenOnePrincipals.policy delete mode 100644 test/jdk/javax/security/auth/PrivateCredentialPermission/Serial.policy delete mode 100644 test/jdk/javax/security/auth/PrivateCredentialPermission/Subset.java delete mode 100644 test/jdk/javax/security/auth/PrivateCredentialPermission/Subset.policy delete mode 100644 test/jdk/javax/security/auth/Subject/Compat.java delete mode 100644 test/jdk/javax/security/auth/Subject/FromACC.java delete mode 100644 test/jdk/javax/security/auth/Subject/Serial.policy delete mode 100644 test/jdk/javax/security/auth/Subject/Synch2.policy delete mode 100644 test/jdk/javax/security/auth/Subject/UnsupportedSV.java delete mode 100644 test/jdk/javax/security/auth/Subject/doAs/NestedActions.java delete mode 100644 test/jdk/javax/security/auth/Subject/doAs/Test.java delete mode 100644 test/jdk/javax/security/auth/Subject/doAs/policy delete mode 100644 test/jdk/javax/security/auth/Subject/doAs/policy.expect.ace delete mode 100644 test/jdk/javax/security/auth/Subject/doAs/policy.expect.pae delete mode 100644 test/jdk/javax/security/auth/Subject/doAs/policy.one.principal delete mode 100644 test/jdk/javax/security/auth/Subject/doAs/policy.two.principals delete mode 100644 test/jdk/javax/security/auth/SubjectDomainCombiner/Regression.policy delete mode 100644 test/jdk/javax/security/auth/login/Configuration/GetInstanceSecurity.grantedPolicy delete mode 100644 test/jdk/javax/security/auth/login/Configuration/GetInstanceSecurity.java delete mode 100644 test/jdk/javax/security/auth/login/Configuration/GetInstanceSecurity.policy delete mode 100644 test/jdk/javax/security/auth/login/LoginContext/ConfigConstructor.policy delete mode 100644 test/jdk/javax/security/auth/login/LoginContext/ConfigConstructorNoPerm.java delete mode 100644 test/jdk/javax/security/auth/login/LoginContext/ConfigConstructorNoPerm.policy delete mode 100644 test/jdk/javax/smartcardio/policy delete mode 100644 test/jdk/javax/sound/midi/MidiSystem/DefaultProperties/DefaultPropertiesNegative.java delete mode 100644 test/jdk/javax/sound/midi/MidiSystem/DefaultProperties/java.policy delete mode 100644 test/jdk/javax/sound/midi/MidiSystem/DefaultProperties/negative.policy rename test/jdk/javax/sound/midi/Soundbanks/{GetSoundBankSecurityException/GetSoundBankSecurityException.java => EmptySoundBankTest.java} (89%) delete mode 100644 test/jdk/javax/sound/midi/Soundbanks/GetSoundBankSecurityException/security.policy delete mode 100644 test/jdk/javax/sound/sampled/AudioSystem/DefaultProperties/DefaultProperties.java delete mode 100644 test/jdk/javax/sound/sampled/AudioSystem/DefaultProperties/DefaultPropertiesNegative.java delete mode 100644 test/jdk/javax/sound/sampled/AudioSystem/DefaultProperties/java.policy delete mode 100644 test/jdk/javax/sound/sampled/AudioSystem/DefaultProperties/negative.policy delete mode 100644 test/jdk/javax/sound/sampled/AudioSystem/DefaultProperties/testdata/conf/sound.properties delete mode 100644 test/jdk/javax/sql/permissionTests/SyncFactoryPermissionsTests.java delete mode 100644 test/jdk/javax/swing/JEditorPane/5076514/bug5076514.java delete mode 100644 test/jdk/javax/swing/JFileChooser/6484091/bug6484091.java delete mode 100644 test/jdk/javax/swing/JFileChooser/6570445/bug6570445.java delete mode 100644 test/jdk/javax/swing/JFileChooser/6738668/bug6738668.java delete mode 100644 test/jdk/javax/swing/JFileChooser/6738668/security.policy delete mode 100644 test/jdk/javax/swing/JFileChooser/7036025/bug7036025.java delete mode 100644 test/jdk/javax/swing/JFileChooser/7036025/security.policy delete mode 100644 test/jdk/javax/swing/JFileChooser/8062561/bug8062561.java delete mode 100644 test/jdk/javax/swing/JFileChooser/8062561/security.policy delete mode 100644 test/jdk/javax/swing/JFileChooser/8062561/security2.policy delete mode 100644 test/jdk/javax/swing/JFileChooser/ShellFolderQueries/ShellFolderQueriesSecurityManagerTest.java delete mode 100644 test/jdk/javax/swing/JFileChooser/ShellFolderQueries/shellfolderqueries.policy delete mode 100644 test/jdk/javax/swing/JPopupMenu/6675802/bug6675802.java delete mode 100644 test/jdk/javax/swing/JPopupMenu/6691503/bug6691503.java delete mode 100644 test/jdk/javax/swing/JPopupMenu/6694823/bug6694823.java delete mode 100644 test/jdk/javax/swing/plaf/synth/Test8043627.java delete mode 100644 test/jdk/javax/swing/text/rtf/bug4178276.java delete mode 100644 test/jdk/javax/xml/crypto/dsig/ErrorHandlerPermissions.java delete mode 100644 test/jdk/javax/xml/crypto/dsig/ErrorHandlerPermissions.policy rename test/jdk/javax/xml/crypto/dsig/{FileSocketPermissions.java => ResolveReferenceURIs.java} (75%) delete mode 100644 test/jdk/javax/xml/crypto/dsig/SecurityManager/XMLDSigWithSecMgr.java delete mode 100644 test/jdk/javax/xml/crypto/dsig/SecurityManager/policy delete mode 100644 test/jdk/javax/xml/crypto/dsig/TransformService/test.policy delete mode 100644 test/jdk/javax/xml/crypto/dsig/keyinfo/KeyInfo/test.policy delete mode 100644 test/jdk/javax/xml/jaxp/common/8020430/TestBase.java delete mode 100644 test/jdk/javax/xml/jaxp/parsers/8021148/TestBase.java delete mode 100644 test/jdk/javax/xml/jaxp/parsers/8022548/TestBase.java delete mode 100644 test/jdk/jdk/dynalink/UntrustedDynamicLinkerFactoryTest.java delete mode 100644 test/jdk/jdk/dynalink/trusted.security.policy delete mode 100644 test/jdk/jdk/dynalink/untrusted.security.policy delete mode 100644 test/jdk/jdk/incubator/vector/empty_security.policy delete mode 100644 test/jdk/jdk/internal/jrtfs/WithSecurityManager.java delete mode 100644 test/jdk/jdk/internal/jrtfs/java.policy delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/DriverRecordingDumper.java delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/TestMissingPermission.java delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/TestRecordingFile.java delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/TestRecordingStream.java delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/TestStreamingFile.java delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/TestStreamingLocal.java delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/TestStreamingRemote.java delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/local-streaming.policy delete mode 100644 test/jdk/jdk/jfr/api/consumer/security/no-permission.policy delete mode 100644 test/jdk/jdk/jfr/jmx/security/TestEnoughPermission.java delete mode 100644 test/jdk/jdk/jfr/jmx/security/TestNoControlPermission.java delete mode 100644 test/jdk/jdk/jfr/jmx/security/TestNoMonitorPermission.java delete mode 100644 test/jdk/jdk/jfr/jmx/security/TestNotificationListenerPermission.java delete mode 100644 test/jdk/jdk/jfr/jmx/security/enough.policy delete mode 100644 test/jdk/jdk/jfr/jmx/security/listener.policy delete mode 100644 test/jdk/jdk/jfr/jmx/security/nocontrol.policy delete mode 100644 test/jdk/jdk/jfr/jmx/security/nomonitor.policy delete mode 100644 test/jdk/jdk/nio/zipfs/PropertyPermissions.policy delete mode 100644 test/jdk/jdk/nio/zipfs/ZipFSPermissionsTest.policy delete mode 100644 test/jdk/jdk/nio/zipfs/test.policy delete mode 100644 test/jdk/jdk/nio/zipfs/test.policy.posix delete mode 100644 test/jdk/jdk/nio/zipfs/test.policy.readonly delete mode 100644 test/jdk/sun/net/www/http/HttpClient/IsKeepingAlive.java delete mode 100644 test/jdk/sun/net/www/http/HttpClient/IsKeepingAlive.policy delete mode 100644 test/jdk/sun/net/www/http/HttpClient/OpenServer.java delete mode 100644 test/jdk/sun/net/www/http/HttpClient/OpenServer.policy rename test/jdk/sun/net/www/http/HttpURLConnection/{NTLMAuthWithSM.java => BasicNTLMAuthTest.java} (94%) delete mode 100644 test/jdk/sun/net/www/http/HttpURLConnection/NTLMAuthWithSM.policy delete mode 100644 test/jdk/sun/net/www/protocol/jrt/WithSecurityManager.java delete mode 100644 test/jdk/sun/net/www/protocol/jrt/java.policy delete mode 100644 test/jdk/sun/nio/cs/TestSJIS0213_SM.java delete mode 100644 test/jdk/sun/reflect/ReflectionFactory/security.policy delete mode 100644 test/jdk/sun/rmi/server/MarshalOutputStream/marshalForeignStub/security.policy delete mode 100644 test/jdk/sun/rmi/transport/tcp/disableMultiplexing/DisableMultiplexing.java delete mode 100644 test/jdk/sun/rmi/transport/tcp/disableMultiplexing/DisableMultiplexing_Stub.java delete mode 100644 test/jdk/sun/security/ec/TestEC.policy delete mode 100644 test/jdk/sun/security/krb5/auto/AcceptPermissions.java delete mode 100644 test/jdk/sun/security/krb5/auto/KeyPermissions.java delete mode 100644 test/jdk/sun/security/krb5/auto/principalProperty/principalSystemPropTest.policy delete mode 100644 test/jdk/sun/security/mscapi/AccessKeyStore.java delete mode 100644 test/jdk/sun/security/mscapi/access.policy delete mode 100644 test/jdk/sun/security/mscapi/noaccess.policy delete mode 100644 test/jdk/sun/security/pkcs11/KeyAgreement/IllegalPackageAccess.java delete mode 100644 test/jdk/sun/security/pkcs11/KeyStore/Basic.policy delete mode 100644 test/jdk/sun/security/pkcs11/Provider/Login.policy delete mode 100644 test/jdk/sun/security/pkcs11/Secmod/policy delete mode 100644 test/jdk/sun/security/pkcs11/ec/policy delete mode 100644 test/jdk/sun/security/pkcs11/policy delete mode 100644 test/jdk/sun/security/pkcs11/rsa/TestCACerts.policy delete mode 100644 test/jdk/sun/security/pkcs11/rsa/TestKeyPairGenerator.policy delete mode 100644 test/jdk/sun/security/pkcs11/rsa/rsakeys.ks.policy delete mode 100644 test/jdk/sun/security/pkcs11/sslecc/policy delete mode 100644 test/jdk/sun/security/pkcs11/tls/TestMasterSecret.policy delete mode 100644 test/jdk/sun/security/pkcs11/tls/policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/Alias.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/Alias.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/AliasExpansion.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/AliasExpansion.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/BadPolicyFile.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/BadPolicyFile.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/CombinedPerms.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/CombinedPerms.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/DefaultPolicy.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/EmailAddress.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/EmailAddress.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/Extra.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/GrantAllPermToExtWhenNoPolicy.sh delete mode 100644 test/jdk/sun/security/provider/PolicyFile/Modules.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/SelfExpansion.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/SelfExpansion.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/SelfWildcard.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/SelfWildcard.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/SomeExtensionClass.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TokenStore.RelPassPolicy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TokenStore.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TokenStore.keystore delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TokenStore.pwd delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TrustedCert.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TrustedCert.keystore delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TrustedCert.keystore1 delete mode 100644 test/jdk/sun/security/provider/PolicyFile/TrustedCert.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/Utf8.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/Utf8.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/WildcardPrincipalName.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/getinstance/GetInstance.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/getinstance/GetInstance.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/getinstance/NoArgPermission.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/getinstance/OneArgPermission.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/getinstance/TwoArgNullActionsPermission.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/getinstance/TwoArgPermission.java delete mode 100644 test/jdk/sun/security/provider/PolicyFile/getinstance/getinstance.sh delete mode 100644 test/jdk/sun/security/provider/PolicyFile/modules.policy delete mode 100644 test/jdk/sun/security/provider/PolicyFile/wildcard.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/AvoidPropertyExpansionExceptions.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/BogusGrants.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/EncodeURL.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExpansionErrorMisleading.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExpansionErrorMisleading.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirs.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirs.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirs1.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirs2.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirs3.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirsA.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirsA/a.jar delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirsB.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirsB/b.jar delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirsChange.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirsChange.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/ExtDirsDefaultPolicy.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/PrincipalExpansionError.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/PrincipalExpansionError.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/PrincipalExpansionError.sh delete mode 100644 test/jdk/sun/security/provider/PolicyParser/PrincipalExpansionErrorAction.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/TokenStore.java delete mode 100644 test/jdk/sun/security/provider/PolicyParser/UnresolvedProperty.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/p001.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/p002.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/p003.policy delete mode 100644 test/jdk/sun/security/provider/PolicyParser/p004.policy delete mode 100644 test/jdk/sun/security/smartcardio/test.policy delete mode 100644 test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.java delete mode 100644 test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.policy delete mode 100644 test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTest.sh delete mode 100644 test/jdk/sun/security/ssl/SSLSocketImpl/NotifyHandshakeTestHeyYou.java delete mode 100644 test/jdk/sun/security/tools/jarsigner/multiRelease/SignedJar.policy delete mode 100644 test/jdk/sun/security/util/DerInputBuffer/Allow.policy delete mode 100644 test/jdk/sun/security/util/FilePermCompat/CompatImpact.java delete mode 100644 test/jdk/sun/security/util/FilePermCompat/Flag.java delete mode 100644 test/jdk/sun/security/util/FilePermCompat/flag.policy delete mode 100644 test/jdk/sun/security/util/Resources/Format.policy delete mode 100644 test/jdk/sun/security/util/Resources/customSysClassLoader/error.policy delete mode 100644 test/jdk/sun/security/util/Resources/early/EarlyResources.java delete mode 100644 test/jdk/sun/security/util/Resources/early/malformed.policy delete mode 100644 test/jdk/sun/security/x509/AVA/Allow.policy delete mode 100644 test/jdk/sun/util/locale/provider/Bug8152817.java delete mode 100644 test/jdk/tools/jlink/SecurityTest.java delete mode 100644 test/jdk/tools/jlink/toolprovider.policy delete mode 100644 test/langtools/tools/javac/api/ToolProvider/ToolProviderTest.java delete mode 100644 test/micro/org/openjdk/bench/java/lang/reflect/ClazzWithSecurityManager.java diff --git a/make/modules/java.base/Copy.gmk b/make/modules/java.base/Copy.gmk index fea544a47a132..7e3a0e9c3ab5e 100644 --- a/make/modules/java.base/Copy.gmk +++ b/make/modules/java.base/Copy.gmk @@ -123,46 +123,6 @@ TARGETS += $(JVMCFG) ################################################################################ -POLICY_SRC := $(TOPDIR)/src/java.base/share/conf/security/java.policy -POLICY_DST := $(CONF_DST_DIR)/security/java.policy - -POLICY_SRC_LIST := $(POLICY_SRC) - -$(POLICY_DST): $(POLICY_SRC_LIST) - $(call MakeTargetDir) - $(RM) $@ $@.tmp - $(foreach f, $(POLICY_SRC_LIST), $(CAT) $(f) >> $@.tmp;) - $(MV) $@.tmp $@ - -TARGETS += $(POLICY_DST) - -################################################################################ - -DEF_POLICY_SRC := $(TOPDIR)/src/java.base/share/lib/security/default.policy -DEF_POLICY_DST := $(LIB_DST_DIR)/security/default.policy - -DEF_POLICY_SRC_LIST := $(DEF_POLICY_SRC) -DEF_POLICY_SRC_LIST += $(CUSTOM_POLICY_SRC_LIST) - -ifeq ($(call isTargetOs, windows), true) - DEF_POLICY_SRC_LIST += $(TOPDIR)/src/java.base/$(OPENJDK_TARGET_OS)/lib/security/default.policy -endif - -# Allow imported modules to modify the java.policy -ifneq ($(IMPORT_MODULES_CONF), ) - DEF_POLICY_SRC_LIST += $(wildcard $(IMPORT_MODULES_CONF)/java.base/security/java.policy.extra) -endif - -$(DEF_POLICY_DST): $(DEF_POLICY_SRC_LIST) - $(call MakeTargetDir) - $(RM) $@ $@.tmp - $(foreach f, $(DEF_POLICY_SRC_LIST), $(CAT) $(f) >> $@.tmp;) - $(MV) $@.tmp $@ - -TARGETS += $(DEF_POLICY_DST) - -################################################################################ - # CACERTS_FILE is optionally set in configure to override the default cacerts # which is otherwise generated in Gendata-java.base.gmk CACERTS_DST := $(LIB_DST_DIR)/security/cacerts diff --git a/make/modules/java.rmi/Launcher.gmk b/make/modules/java.rmi/Launcher.gmk index 14b381a540ec3..8c335711da026 100644 --- a/make/modules/java.rmi/Launcher.gmk +++ b/make/modules/java.rmi/Launcher.gmk @@ -31,5 +31,4 @@ include LauncherCommon.gmk $(eval $(call SetupBuildLauncher, rmiregistry, \ MAIN_CLASS := sun.rmi.registry.RegistryImpl, \ - JAVA_ARGS := -Djava.security.manager=allow, \ )) diff --git a/src/hotspot/share/classfile/dictionary.cpp b/src/hotspot/share/classfile/dictionary.cpp index f25c453582fb8..eecfc9e88a0fd 100644 --- a/src/hotspot/share/classfile/dictionary.cpp +++ b/src/hotspot/share/classfile/dictionary.cpp @@ -347,68 +347,6 @@ void Dictionary::check_package_access(InstanceKlass* klass, assert(class_loader() != nullptr, "Should not call this"); assert(protection_domain() != nullptr, "Should not call this"); - - if (!java_lang_System::allow_security_manager()) { - // No need for any further checking. Package access always allowed. - return; - } - - if (is_in_package_access_cache(THREAD, klass->name(), protection_domain)) { - // No need to check again. - return; - } - - // We only have to call checkPackageAccess if there's a security manager installed. - if (java_lang_System::has_security_manager()) { - - // This handle and the class_loader handle passed in keeps this class from - // being unloaded through several GC points. - // The class_loader handle passed in is the initiating loader. - Handle mirror(THREAD, klass->java_mirror()); - - // Now we have to call back to java to check if the initating class has access - InstanceKlass* system_loader = vmClasses::ClassLoader_klass(); - JavaValue result(T_VOID); - JavaCalls::call_special(&result, - class_loader, - system_loader, - vmSymbols::checkPackageAccess_name(), - vmSymbols::class_protectiondomain_signature(), - mirror, - protection_domain, - THREAD); - - LogTarget(Debug, protectiondomain) lt; - if (lt.is_enabled()) { - ResourceMark rm(THREAD); - // Print out trace information - LogStream ls(lt); - ls.print_cr("Checking package access"); - ls.print("class loader: "); - class_loader()->print_value_on(&ls); - ls.print(" protection domain: "); - protection_domain()->print_value_on(&ls); - ls.print(" loading: "); klass->print_value_on(&ls); - if (HAS_PENDING_EXCEPTION) { - ls.print_cr(" DENIED !!!!!!!!!!!!!!!!!!!!!"); - } else { - ls.print_cr(" granted"); - } - } - - if (HAS_PENDING_EXCEPTION) return; - } - - // If no exception has been thrown, we have checked that the protection_domain can access - // this klass. Always add it to the cache (even if no SecurityManager is installed yet). - // - // This ensures that subsequent calls to Dictionary::find(THREAD, klass->name(), protection_domain) - // will always succeed. I.e., a new SecurityManager installed in the future cannot retroactively - // revoke the granted access. - { - MutexLocker mu(THREAD, SystemDictionary_lock); - add_to_package_access_cache(THREAD, klass, protection_domain); - } } // During class loading we may have cached a protection domain that has diff --git a/src/hotspot/share/classfile/javaClasses.cpp b/src/hotspot/share/classfile/javaClasses.cpp index 0b6704c1a5b22..c18f23badd14f 100644 --- a/src/hotspot/share/classfile/javaClasses.cpp +++ b/src/hotspot/share/classfile/javaClasses.cpp @@ -1599,7 +1599,6 @@ oop java_lang_Thread_Constants::get_VTHREAD_GROUP() { int java_lang_Thread::_holder_offset; int java_lang_Thread::_name_offset; int java_lang_Thread::_contextClassLoader_offset; -int java_lang_Thread::_inheritedAccessControlContext_offset; int java_lang_Thread::_eetop_offset; int java_lang_Thread::_jvmti_thread_state_offset; int java_lang_Thread::_jvmti_VTMS_transition_disable_count_offset; @@ -1616,7 +1615,6 @@ JFR_ONLY(int java_lang_Thread::_jfr_epoch_offset;) macro(_holder_offset, k, "holder", thread_fieldholder_signature, false); \ macro(_name_offset, k, vmSymbols::name_name(), string_signature, false); \ macro(_contextClassLoader_offset, k, vmSymbols::contextClassLoader_name(), classloader_signature, false); \ - macro(_inheritedAccessControlContext_offset, k, vmSymbols::inheritedAccessControlContext_name(), accesscontrolcontext_signature, false); \ macro(_eetop_offset, k, "eetop", long_signature, false); \ macro(_interrupted_offset, k, "interrupted", bool_signature, false); \ macro(_interruptLock_offset, k, "interruptLock", object_signature, false); \ @@ -1794,10 +1792,6 @@ oop java_lang_Thread::context_class_loader(oop java_thread) { return java_thread->obj_field(_contextClassLoader_offset); } -oop java_lang_Thread::inherited_access_control_context(oop java_thread) { - return java_thread->obj_field(_inheritedAccessControlContext_offset); -} - jlong java_lang_Thread::stackSize(oop java_thread) { GET_FIELDHOLDER_FIELD(java_thread, stackSize, 0); @@ -4861,17 +4855,11 @@ oop java_lang_ClassLoader::unnamedModule(oop loader) { int java_lang_System::_static_in_offset; int java_lang_System::_static_out_offset; int java_lang_System::_static_err_offset; -int java_lang_System::_static_security_offset; -int java_lang_System::_static_allow_security_offset; -int java_lang_System::_static_never_offset; #define SYSTEM_FIELDS_DO(macro) \ macro(_static_in_offset, k, "in", input_stream_signature, true); \ macro(_static_out_offset, k, "out", print_stream_signature, true); \ - macro(_static_err_offset, k, "err", print_stream_signature, true); \ - macro(_static_security_offset, k, "security", security_manager_signature, true); \ - macro(_static_allow_security_offset, k, "allowSecurityManager", int_signature, true); \ - macro(_static_never_offset, k, "NEVER", int_signature, true) + macro(_static_err_offset, k, "err", print_stream_signature, true); void java_lang_System::compute_offsets() { InstanceKlass* k = vmClasses::System_klass(); @@ -4881,21 +4869,12 @@ void java_lang_System::compute_offsets() { // This field tells us that a security manager can never be installed so we // can completely skip populating the ProtectionDomainCacheTable. bool java_lang_System::allow_security_manager() { - static int initialized = false; - static bool allowed = true; // default - if (!initialized) { - oop base = vmClasses::System_klass()->static_field_base_raw(); - int never = base->int_field(_static_never_offset); - allowed = (base->int_field(_static_allow_security_offset) != never); - initialized = true; - } - return allowed; + return false; } // This field tells us that a security manager is installed. bool java_lang_System::has_security_manager() { - oop base = vmClasses::System_klass()->static_field_base_raw(); - return base->obj_field(_static_security_offset) != nullptr; + return false; } #if INCLUDE_CDS diff --git a/src/hotspot/share/classfile/javaClasses.hpp b/src/hotspot/share/classfile/javaClasses.hpp index c968859c591e5..e01235958103a 100644 --- a/src/hotspot/share/classfile/javaClasses.hpp +++ b/src/hotspot/share/classfile/javaClasses.hpp @@ -358,7 +358,6 @@ class java_lang_Thread : AllStatic { static int _holder_offset; static int _name_offset; static int _contextClassLoader_offset; - static int _inheritedAccessControlContext_offset; static int _eetop_offset; static int _jvmti_thread_state_offset; static int _jvmti_VTMS_transition_disable_count_offset; @@ -405,8 +404,6 @@ class java_lang_Thread : AllStatic { static void set_daemon(oop java_thread); // Context ClassLoader static oop context_class_loader(oop java_thread); - // Control context - static oop inherited_access_control_context(oop java_thread); // Stack size hint static jlong stackSize(oop java_thread); // Thread ID diff --git a/src/hotspot/share/classfile/vmSymbols.hpp b/src/hotspot/share/classfile/vmSymbols.hpp index d42e718a155d2..34861b52d54fc 100644 --- a/src/hotspot/share/classfile/vmSymbols.hpp +++ b/src/hotspot/share/classfile/vmSymbols.hpp @@ -439,10 +439,8 @@ class SerializeClosure; template(getProperty_name, "getProperty") \ template(context_name, "context") \ template(contextClassLoader_name, "contextClassLoader") \ - template(inheritedAccessControlContext_name, "inheritedAccessControlContext") \ template(getClassContext_name, "getClassContext") \ template(wait_name, "wait0") \ - template(checkPackageAccess_name, "checkPackageAccess") \ template(forName_name, "forName") \ template(forName0_name, "forName0") \ template(isJavaIdentifierStart_name, "isJavaIdentifierStart") \ diff --git a/src/hotspot/share/include/jvm.h b/src/hotspot/share/include/jvm.h index d4fddd222b2bb..28e8c2b08d36e 100644 --- a/src/hotspot/share/include/jvm.h +++ b/src/hotspot/share/include/jvm.h @@ -723,13 +723,6 @@ JNIEXPORT jbyte JNICALL JVM_ConstantPoolGetTagAt JNIEXPORT jobjectArray JNICALL JVM_GetMethodParameters(JNIEnv *env, jobject method); -/* - * java.security.* - */ - -JNIEXPORT jobject JNICALL -JVM_GetInheritedAccessControlContext(JNIEnv *env, jclass cls); - /* * Ensure that code doing a stackwalk and using javaVFrame::locals() to * get the value will see a materialized value and not a scalar-replaced @@ -741,9 +734,6 @@ JVM_GetInheritedAccessControlContext(JNIEnv *env, jclass cls); JNIEXPORT void JNICALL JVM_EnsureMaterializedForStackWalk_func(JNIEnv* env, jobject vthread, jobject value); -JNIEXPORT jobject JNICALL -JVM_GetStackAccessControlContext(JNIEnv *env, jclass cls); - /* * Signal support, used to implement the shutdown sequence. Every VM must * support JVM_SIGINT and JVM_SIGTERM, raising the former for user interrupts diff --git a/src/hotspot/share/prims/jvm.cpp b/src/hotspot/share/prims/jvm.cpp index 8bc03ce2efb42..9a132b089f2e1 100644 --- a/src/hotspot/share/prims/jvm.cpp +++ b/src/hotspot/share/prims/jvm.cpp @@ -1269,87 +1269,6 @@ JVM_ENTRY(jobject, JVM_GetProtectionDomain(JNIEnv *env, jclass cls)) JVM_END -// Returns the inherited_access_control_context field of the running thread. -JVM_ENTRY(jobject, JVM_GetInheritedAccessControlContext(JNIEnv *env, jclass cls)) - oop result = java_lang_Thread::inherited_access_control_context(thread->threadObj()); - return JNIHandles::make_local(THREAD, result); -JVM_END - -JVM_ENTRY(jobject, JVM_GetStackAccessControlContext(JNIEnv *env, jclass cls)) - if (!UsePrivilegedStack) return nullptr; - - ResourceMark rm(THREAD); - GrowableArray* local_array = new GrowableArray(12); - JvmtiVMObjectAllocEventCollector oam; - - // count the protection domains on the execution stack. We collapse - // duplicate consecutive protection domains into a single one, as - // well as stopping when we hit a privileged frame. - - oop previous_protection_domain = nullptr; - Handle privileged_context(thread, nullptr); - bool is_privileged = false; - oop protection_domain = nullptr; - - // Iterate through Java frames - vframeStream vfst(thread); - for(; !vfst.at_end(); vfst.next()) { - // get method of frame - Method* method = vfst.method(); - - // stop at the first privileged frame - if (method->method_holder() == vmClasses::AccessController_klass() && - method->name() == vmSymbols::executePrivileged_name()) - { - // this frame is privileged - is_privileged = true; - - javaVFrame *priv = vfst.asJavaVFrame(); // executePrivileged - - StackValueCollection* locals = priv->locals(); - StackValue* ctx_sv = locals->at(1); // AccessControlContext context - StackValue* clr_sv = locals->at(2); // Class caller - assert(!ctx_sv->obj_is_scalar_replaced(), "found scalar-replaced object"); - assert(!clr_sv->obj_is_scalar_replaced(), "found scalar-replaced object"); - privileged_context = ctx_sv->get_obj(); - Handle caller = clr_sv->get_obj(); - - Klass *caller_klass = java_lang_Class::as_Klass(caller()); - protection_domain = caller_klass->protection_domain(); - } else { - protection_domain = method->method_holder()->protection_domain(); - } - - if ((previous_protection_domain != protection_domain) && (protection_domain != nullptr)) { - local_array->push(Handle(thread, protection_domain)); - previous_protection_domain = protection_domain; - } - - if (is_privileged) break; - } - - - // either all the domains on the stack were system domains, or - // we had a privileged system domain - if (local_array->is_empty()) { - if (is_privileged && privileged_context.is_null()) return nullptr; - - oop result = java_security_AccessControlContext::create(objArrayHandle(), is_privileged, privileged_context, CHECK_NULL); - return JNIHandles::make_local(THREAD, result); - } - - objArrayOop context = oopFactory::new_objArray(vmClasses::ProtectionDomain_klass(), - local_array->length(), CHECK_NULL); - objArrayHandle h_context(thread, context); - for (int index = 0; index < local_array->length(); index++) { - h_context->obj_at_put(index, local_array->at(index)()); - } - - oop result = java_security_AccessControlContext::create(h_context, is_privileged, privileged_context, CHECK_NULL); - - return JNIHandles::make_local(THREAD, result); -JVM_END - class ScopedValueBindingsResolver { public: InstanceKlass* Carrier_klass; diff --git a/src/hotspot/share/runtime/globals.hpp b/src/hotspot/share/runtime/globals.hpp index cca58b0c22e26..70b537bf2d731 100644 --- a/src/hotspot/share/runtime/globals.hpp +++ b/src/hotspot/share/runtime/globals.hpp @@ -681,9 +681,6 @@ const int ObjectAlignmentInBytes = 8; develop(bool, PrintCodeCacheExtension, false, \ "Print extension of code cache") \ \ - develop(bool, UsePrivilegedStack, true, \ - "Enable the security JVM functions") \ - \ product(bool, ClassUnloading, true, \ "Do unloading of classes") \ \ diff --git a/src/java.base/share/classes/java/io/File.java b/src/java.base/share/classes/java/io/File.java index 61c15bdd15c0b..b8eda9dcf8315 100644 --- a/src/java.base/share/classes/java/io/File.java +++ b/src/java.base/share/classes/java/io/File.java @@ -556,9 +556,6 @@ public boolean isAbsolute() { * @return The absolute pathname string denoting the same file or * directory as this abstract pathname * - * @throws SecurityException - * If a required system property value cannot be accessed. - * * @see java.io.File#isAbsolute() */ public String getAbsolutePath() { @@ -572,9 +569,6 @@ public String getAbsolutePath() { * @return The absolute abstract pathname denoting the same file or * directory as this abstract pathname * - * @throws SecurityException - * If a required system property value cannot be accessed. - * * @since 1.2 */ public File getAbsoluteFile() { @@ -614,12 +608,6 @@ public File getAbsoluteFile() { * construction of the canonical pathname may require * filesystem queries * - * @throws SecurityException - * If a required system property value cannot be accessed, or - * if a security manager exists and its {@link - * java.lang.SecurityManager#checkRead} method denies - * read access to the file - * * @since 1.1 * @see Path#toRealPath */ @@ -642,12 +630,6 @@ public String getCanonicalPath() throws IOException { * construction of the canonical pathname may require * filesystem queries * - * @throws SecurityException - * If a required system property value cannot be accessed, or - * if a security manager exists and its {@link - * java.lang.SecurityManager#checkRead} method denies - * read access to the file - * * @since 1.2 * @see Path#toRealPath */ @@ -736,8 +718,6 @@ public URL toURL() throws MalformedURLException { * @return An absolute, hierarchical URI with a scheme equal to * {@code "file"}, a path representing this abstract pathname, * and undefined authority, query, and fragment components - * @throws SecurityException If a required system property value cannot - * be accessed. * * @see #File(java.net.URI) * @see java.net.URI @@ -769,11 +749,6 @@ public URI toURI() { * @return {@code true} if and only if the file specified by this * abstract pathname exists and can be read by the * application; {@code false} otherwise - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method denies read access to the file */ public boolean canRead() { @SuppressWarnings("removal") @@ -798,11 +773,6 @@ public boolean canRead() { * contains a file denoted by this abstract pathname and * the application is allowed to write to the file; * {@code false} otherwise. - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the file */ public boolean canWrite() { @SuppressWarnings("removal") @@ -822,11 +792,6 @@ public boolean canWrite() { * * @return {@code true} if and only if the file or directory denoted * by this abstract pathname exists; {@code false} otherwise - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method denies read access to the file or directory */ public boolean exists() { @SuppressWarnings("removal") @@ -853,11 +818,6 @@ public boolean exists() { * @return {@code true} if and only if the file denoted by this * abstract pathname exists and is a directory; * {@code false} otherwise - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method denies read access to the file */ public boolean isDirectory() { @SuppressWarnings("removal") @@ -886,11 +846,6 @@ public boolean isDirectory() { * @return {@code true} if and only if the file denoted by this * abstract pathname exists and is a normal file; * {@code false} otherwise - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method denies read access to the file */ public boolean isFile() { @SuppressWarnings("removal") @@ -923,11 +878,6 @@ public boolean isFile() { * abstract pathname is hidden according to the conventions of the * underlying platform * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method denies read access to the file - * * @since 1.2 */ public boolean isHidden() { @@ -968,11 +918,6 @@ public boolean isHidden() { * file does not exist or if an I/O error occurs. The value may * be negative indicating the number of milliseconds before the * epoch - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method denies read access to the file */ public long lastModified() { @SuppressWarnings("removal") @@ -1000,11 +945,6 @@ public long lastModified() { * pathname, or {@code 0L} if the file does not exist. Some * operating systems may return {@code 0L} for pathnames * denoting system-dependent entities such as devices or pipes. - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method denies read access to the file */ public long length() { @SuppressWarnings("removal") @@ -1040,11 +980,6 @@ public long length() { * @throws IOException * If an I/O error occurred * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the file - * * @since 1.2 */ public boolean createNewFile() throws IOException { @@ -1070,11 +1005,6 @@ public boolean createNewFile() throws IOException { * * @return {@code true} if and only if the file or directory is * successfully deleted; {@code false} otherwise - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkDelete} method denies - * delete access to the file */ public boolean delete() { @SuppressWarnings("removal") @@ -1108,11 +1038,6 @@ public boolean delete() { * {@link java.nio.channels.FileLock FileLock} * facility should be used instead. * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkDelete} method denies - * delete access to the file - * * @see #delete * * @since 1.2 @@ -1155,11 +1080,6 @@ public void deleteOnExit() { * empty if the directory is empty. Returns {@code null} if * this abstract pathname does not denote a directory, or if an * I/O error occurs. - * - * @throws SecurityException - * If a security manager exists and its {@link - * SecurityManager#checkRead(String)} method denies read access to - * the directory */ public String[] list() { return normalizedList(); @@ -1175,11 +1095,6 @@ public String[] list() { * empty if the directory is empty. Returns {@code null} if * this abstract pathname does not denote a directory, or if an * I/O error occurs. - * - * @throws SecurityException - * If a security manager exists and its {@link - * SecurityManager#checkRead(String)} method denies read access to - * the directory */ private final String[] normalizedList() { @SuppressWarnings("removal") @@ -1223,11 +1138,6 @@ private final String[] normalizedList() { * Returns {@code null} if this abstract pathname does not denote * a directory, or if an I/O error occurs. * - * @throws SecurityException - * If a security manager exists and its {@link - * SecurityManager#checkRead(String)} method denies read access to - * the directory - * * @see java.nio.file.Files#newDirectoryStream(Path,String) */ public String[] list(FilenameFilter filter) { @@ -1275,11 +1185,6 @@ public String[] list(FilenameFilter filter) { * {@code null} if this abstract pathname does not denote a * directory, or if an I/O error occurs. * - * @throws SecurityException - * If a security manager exists and its {@link - * SecurityManager#checkRead(String)} method denies read access to - * the directory - * * @since 1.2 */ public File[] listFiles() { @@ -1315,11 +1220,6 @@ public File[] listFiles() { * {@code null} if this abstract pathname does not denote a * directory, or if an I/O error occurs. * - * @throws SecurityException - * If a security manager exists and its {@link - * SecurityManager#checkRead(String)} method denies read access to - * the directory - * * @since 1.2 * @see java.nio.file.Files#newDirectoryStream(Path,String) */ @@ -1353,11 +1253,6 @@ public File[] listFiles(FilenameFilter filter) { * {@code null} if this abstract pathname does not denote a * directory, or if an I/O error occurs. * - * @throws SecurityException - * If a security manager exists and its {@link - * SecurityManager#checkRead(String)} method denies read access to - * the directory - * * @since 1.2 * @see java.nio.file.Files#newDirectoryStream(Path,java.nio.file.DirectoryStream.Filter) */ @@ -1378,11 +1273,6 @@ public File[] listFiles(FileFilter filter) { * * @return {@code true} if and only if the directory was * created; {@code false} otherwise - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method does not permit the named directory to be created */ public boolean mkdir() { @SuppressWarnings("removal") @@ -1405,16 +1295,6 @@ public boolean mkdir() { * @return {@code true} if and only if the directory was created, * along with all necessary parent directories; {@code false} * otherwise - * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkRead(java.lang.String)} - * method does not permit verification of the existence of the - * named directory and all necessary parent directories; or if - * the {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method does not permit the named directory and all necessary - * parent directories to be created */ public boolean mkdirs() { if (exists()) { @@ -1458,11 +1338,6 @@ public boolean mkdirs() { * @return {@code true} if and only if the renaming succeeded; * {@code false} otherwise * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to either the old or new pathnames - * * @throws NullPointerException * If parameter {@code dest} is {@code null} */ @@ -1501,11 +1376,6 @@ public boolean renameTo(File dest) { * * @throws IllegalArgumentException If the argument is negative * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the named file - * * @since 1.2 */ public boolean setLastModified(long time) { @@ -1533,11 +1403,6 @@ public boolean setLastModified(long time) { * @return {@code true} if and only if the operation succeeded; * {@code false} otherwise * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the named file - * * @since 1.2 */ public boolean setReadOnly() { @@ -1577,11 +1442,6 @@ public boolean setReadOnly() { * operation will fail if the user does not have permission to change * the access permissions of this abstract pathname. * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the named file - * * @since 1.6 */ public boolean setWritable(boolean writable, boolean ownerOnly) { @@ -1617,11 +1477,6 @@ public boolean setWritable(boolean writable, boolean ownerOnly) { * operation will fail if the user does not have permission to * change the access permissions of this abstract pathname. * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the file - * * @since 1.6 */ public boolean setWritable(boolean writable) { @@ -1659,11 +1514,6 @@ public boolean setWritable(boolean writable) { * fails, or the value of the {@code readable} parameter if * setting the read permission is not supported. * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the file - * * @since 1.6 */ public boolean setReadable(boolean readable, boolean ownerOnly) { @@ -1705,11 +1555,6 @@ public boolean setReadable(boolean readable, boolean ownerOnly) { * fails, or the value of the {@code readable} parameter if * setting the read permission is not supported. * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the file - * * @since 1.6 */ public boolean setReadable(boolean readable) { @@ -1747,11 +1592,6 @@ public boolean setReadable(boolean readable) { * fails, or the value of the {@code executable} parameter if * setting the execute permission is not supported. * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the file - * * @since 1.6 */ public boolean setExecutable(boolean executable, boolean ownerOnly) { @@ -1793,11 +1633,6 @@ public boolean setExecutable(boolean executable, boolean ownerOnly) { * fails, or the value of the {@code executable} parameter if * setting the execute permission is not supported. * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method denies write access to the file - * * @since 1.6 */ public boolean setExecutable(boolean executable) { @@ -1814,11 +1649,6 @@ public boolean setExecutable(boolean executable) { * @return {@code true} if and only if the abstract pathname exists * and the application is allowed to execute the file * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkExec(java.lang.String)} - * method denies execute access to the file - * * @since 1.6 */ public boolean canExecute() { @@ -1850,12 +1680,6 @@ public boolean canExecute() { * machine will begin with one of the roots returned by this method. * There is no guarantee that a root directory can be accessed. * - *

Unlike most methods in this class, this method does not throw - * security exceptions. If a security manager exists and its {@link - * SecurityManager#checkRead(String)} method denies read access to a - * particular root directory, then that directory will not appear in the - * result. - * * @implNote * Windows platforms, for example, have a root directory * for each active drive; UNIX platforms have a single root directory, @@ -1898,12 +1722,6 @@ public static File[] listRoots() { * abstract pathname does not name a partition or if the size * cannot be obtained * - * @throws SecurityException - * If a security manager has been installed and it denies - * {@link RuntimePermission}{@code ("getFileSystemAttributes")} - * or its {@link SecurityManager#checkRead(String)} method denies - * read access to the file named by this abstract pathname - * * @since 1.6 * @see FileStore#getTotalSpace */ @@ -1942,12 +1760,6 @@ public long getTotalSpace() { * equal to the total file system size returned by * {@link #getTotalSpace}. * - * @throws SecurityException - * If a security manager has been installed and it denies - * {@link RuntimePermission}{@code ("getFileSystemAttributes")} - * or its {@link SecurityManager#checkRead(String)} method denies - * read access to the file named by this abstract pathname - * * @since 1.6 * @see FileStore#getUnallocatedSpace */ @@ -1989,12 +1801,6 @@ public long getFreeSpace() { * is not available, this method will be equivalent to a call to * {@link #getFreeSpace}. * - * @throws SecurityException - * If a security manager has been installed and it denies - * {@link RuntimePermission}{@code ("getFileSystemAttributes")} - * or its {@link SecurityManager#checkRead(String)} method denies - * read access to the file named by this abstract pathname - * * @since 1.6 * @see FileStore#getUsableSpace */ @@ -2176,11 +1982,6 @@ static File generateFile(String prefix, String suffix, File dir) * @throws IOException * If a file could not be created * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method does not allow a file to be created - * * @since 1.2 */ public static File createTempFile(String prefix, String suffix, @@ -2250,11 +2051,6 @@ public static File createTempFile(String prefix, String suffix, * * @throws IOException If a file could not be created * - * @throws SecurityException - * If a security manager exists and its {@link - * java.lang.SecurityManager#checkWrite(java.lang.String)} - * method does not allow a file to be created - * * @since 1.2 * @see java.nio.file.Files#createTempDirectory(String,FileAttribute[]) */ diff --git a/src/java.base/share/classes/java/io/FileInputStream.java b/src/java.base/share/classes/java/io/FileInputStream.java index 4210a0f56b6b6..e429faec09bd0 100644 --- a/src/java.base/share/classes/java/io/FileInputStream.java +++ b/src/java.base/share/classes/java/io/FileInputStream.java @@ -95,11 +95,6 @@ public class FileInputStream extends InputStream * object is created to represent this file * connection. *

- * First, if there is a security - * manager, its {@code checkRead} method - * is called with the {@code name} argument - * as its argument. - *

* If the named file does not exist, is a directory rather than a regular * file, or for some other reason cannot be opened for reading then a * {@code FileNotFoundException} is thrown. @@ -109,10 +104,6 @@ public class FileInputStream extends InputStream * is a directory rather than a regular file, * or for some other reason cannot be opened for * reading. - * @throws SecurityException if a security manager exists and its - * {@code checkRead} method denies read access - * to the file. - * @see java.lang.SecurityManager#checkRead(java.lang.String) */ public FileInputStream(String name) throws FileNotFoundException { this(name != null ? new File(name) : null); @@ -126,11 +117,6 @@ public FileInputStream(String name) throws FileNotFoundException { * A new {@code FileDescriptor} object * is created to represent this file connection. *

- * First, if there is a security manager, - * its {@code checkRead} method is called - * with the path represented by the {@code file} - * argument as its argument. - *

* If the named file does not exist, is a directory rather than a regular * file, or for some other reason cannot be opened for reading then a * {@code FileNotFoundException} is thrown. @@ -140,10 +126,7 @@ public FileInputStream(String name) throws FileNotFoundException { * is a directory rather than a regular file, * or for some other reason cannot be opened for * reading. - * @throws SecurityException if a security manager exists and its - * {@code checkRead} method denies read access to the file. * @see java.io.File#getPath() - * @see java.lang.SecurityManager#checkRead(java.lang.String) */ @SuppressWarnings("this-escape") public FileInputStream(File file) throws FileNotFoundException { @@ -171,11 +154,6 @@ public FileInputStream(File file) throws FileNotFoundException { * {@code fdObj}, which represents an existing connection to an * actual file in the file system. *

- * If there is a security manager, its {@code checkRead} method is - * called with the file descriptor {@code fdObj} as its argument to - * see if it's ok to read the file descriptor. If read access is denied - * to the file descriptor a {@code SecurityException} is thrown. - *

* If {@code fdObj} is null then a {@code NullPointerException} * is thrown. *

@@ -185,10 +163,6 @@ public FileInputStream(File file) throws FileNotFoundException { * I/O on the stream, an {@code IOException} is thrown. * * @param fdObj the file descriptor to be opened for reading. - * @throws SecurityException if a security manager exists and its - * {@code checkRead} method denies read access to the - * file descriptor. - * @see SecurityManager#checkRead(java.io.FileDescriptor) */ @SuppressWarnings("this-escape") public FileInputStream(FileDescriptor fdObj) { diff --git a/src/java.base/share/classes/java/io/FileOutputStream.java b/src/java.base/share/classes/java/io/FileOutputStream.java index ff15e831b9530..557bea0c3fc51 100644 --- a/src/java.base/share/classes/java/io/FileOutputStream.java +++ b/src/java.base/share/classes/java/io/FileOutputStream.java @@ -103,9 +103,6 @@ public class FileOutputStream extends OutputStream * A new {@code FileDescriptor} object is * created to represent this file connection. *

- * First, if there is a security manager, its {@code checkWrite} - * method is called with {@code name} as its argument. - *

* If the file exists but is a directory rather than a regular file, does * not exist but cannot be created, or cannot be opened for any other * reason then a {@code FileNotFoundException} is thrown. @@ -118,10 +115,6 @@ public class FileOutputStream extends OutputStream * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason - * @throws SecurityException if a security manager exists and its - * {@code checkWrite} method denies write access - * to the file. - * @see java.lang.SecurityManager#checkWrite(java.lang.String) */ public FileOutputStream(String name) throws FileNotFoundException { this(name != null ? new File(name) : null, false); @@ -137,9 +130,6 @@ public FileOutputStream(String name) throws FileNotFoundException { * A new {@code FileDescriptor} object is created to represent this * file connection. *

- * First, if there is a security manager, its {@code checkWrite} - * method is called with {@code name} as its argument. - *

* If the file exists but is a directory rather than a regular file, does * not exist but cannot be created, or cannot be opened for any other * reason then a {@code FileNotFoundException} is thrown. @@ -150,10 +140,6 @@ public FileOutputStream(String name) throws FileNotFoundException { * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason. - * @throws SecurityException if a security manager exists and its - * {@code checkWrite} method denies write access - * to the file. - * @see java.lang.SecurityManager#checkWrite(java.lang.String) * @since 1.1 */ public FileOutputStream(String name, boolean append) @@ -171,10 +157,6 @@ public FileOutputStream(String name, boolean append) * A new {@code FileDescriptor} object is * created to represent this file connection. *

- * First, if there is a security manager, its {@code checkWrite} - * method is called with the path represented by the {@code file} - * argument as its argument. - *

* If the file exists but is a directory rather than a regular file, does * not exist but cannot be created, or cannot be opened for any other * reason then a {@code FileNotFoundException} is thrown. @@ -183,12 +165,7 @@ public FileOutputStream(String name, boolean append) * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason - * @throws SecurityException if a security manager exists and its - * {@code checkWrite} method denies write access - * to the file. * @see java.io.File#getPath() - * @see java.lang.SecurityException - * @see java.lang.SecurityManager#checkWrite(java.lang.String) */ public FileOutputStream(File file) throws FileNotFoundException { this(file, false); @@ -205,10 +182,6 @@ public FileOutputStream(File file) throws FileNotFoundException { * A new {@code FileDescriptor} object is created to represent this * file connection. *

- * First, if there is a security manager, its {@code checkWrite} - * method is called with the path represented by the {@code file} - * argument as its argument. - *

* If the file exists but is a directory rather than a regular file, does * not exist but cannot be created, or cannot be opened for any other * reason then a {@code FileNotFoundException} is thrown. @@ -219,12 +192,7 @@ public FileOutputStream(File file) throws FileNotFoundException { * @throws FileNotFoundException if the file exists but is a directory * rather than a regular file, does not exist but cannot * be created, or cannot be opened for any other reason - * @throws SecurityException if a security manager exists and its - * {@code checkWrite} method denies write access - * to the file. * @see java.io.File#getPath() - * @see java.lang.SecurityException - * @see java.lang.SecurityManager#checkWrite(java.lang.String) * @since 1.4 */ @SuppressWarnings("this-escape") @@ -256,10 +224,6 @@ public FileOutputStream(File file, boolean append) * descriptor, which represents an existing connection to an actual * file in the file system. *

- * First, if there is a security manager, its {@code checkWrite} - * method is called with the file descriptor {@code fdObj} - * argument as its argument. - *

* If {@code fdObj} is null then a {@code NullPointerException} * is thrown. *

@@ -269,10 +233,6 @@ public FileOutputStream(File file, boolean append) * I/O on the stream, an {@code IOException} is thrown. * * @param fdObj the file descriptor to be opened for writing - * @throws SecurityException if a security manager exists and its - * {@code checkWrite} method denies - * write access to the file descriptor - * @see java.lang.SecurityManager#checkWrite(java.io.FileDescriptor) */ @SuppressWarnings("this-escape") public FileOutputStream(FileDescriptor fdObj) { diff --git a/src/java.base/share/classes/java/io/FilePermission.java b/src/java.base/share/classes/java/io/FilePermission.java index 808c42931434d..b11e0dd25bebe 100644 --- a/src/java.base/share/classes/java/io/FilePermission.java +++ b/src/java.base/share/classes/java/io/FilePermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -61,39 +61,15 @@ * (recursively) all files and subdirectories contained in the current * directory. *

- * The actions to be granted are passed to the constructor in a string containing + * The actions are passed to the constructor in a string containing * a list of one or more comma-separated keywords. The possible keywords are - * "read", "write", "execute", "delete", and "readlink". Their meaning is - * defined as follows: - * - *

- *
read
read permission - *
write
write permission - *
execute - *
execute permission. Allows {@code Runtime.exec} to - * be called. Corresponds to {@code SecurityManager.checkExec}. - *
delete - *
delete permission. Allows {@code File.delete} to - * be called. Corresponds to {@code SecurityManager.checkDelete}. - *
readlink - *
read link permission. Allows the target of a - * symbolic link - * to be read by invoking the {@link java.nio.file.Files#readSymbolicLink - * readSymbolicLink } method. - *
+ * "read", "write", "execute", "delete", and "readlink". *

* The actions string is converted to lowercase before processing. - *

- * Be careful when granting FilePermissions. Think about the implications - * of granting read and especially write access to various files and - * directories. The {@literal "<>"} permission with write action is - * especially dangerous. This grants permission to write to the entire - * file system. One thing this effectively allows is replacement of the - * system binary, including the JVM runtime environment. - *

- * Please note: Code can always read a file from the same - * directory it's in (or a subdirectory of that directory); it does not - * need explicit permission to do so. + * + * @apiNote + * This permission cannot be used for controlling access to resources + * as the Security Manager is no longer supported. * * @see java.security.Permission * @see java.security.Permissions diff --git a/src/java.base/share/classes/java/io/ObjectInputFilter.java b/src/java.base/share/classes/java/io/ObjectInputFilter.java index 879820761c129..9a04e1f58e330 100644 --- a/src/java.base/share/classes/java/io/ObjectInputFilter.java +++ b/src/java.base/share/classes/java/io/ObjectInputFilter.java @@ -728,8 +728,6 @@ public static ObjectInputFilter getSerialFilter() { * Set the static JVM-wide filter if it has not already been configured or set. * * @param filter the deserialization filter to set as the JVM-wide filter; not null - * @throws SecurityException if there is security manager and the - * {@code SerializablePermission("serialFilter")} is not granted * @throws IllegalStateException if the filter has already been set or the initialization * of the filter from the system property {@code jdk.serialFilter} or * the security property {@code jdk.serialFilter} fails. @@ -829,8 +827,6 @@ static BinaryOperator getSerialFilterFactorySingleton() { * @throws IllegalStateException if the builtin deserialization filter factory * has already been replaced or any instance of {@link ObjectInputStream} * has been created. - * @throws SecurityException if there is security manager and the - * {@code SerializablePermission("serialFilter")} is not granted * @since 17 */ public static void setSerialFilterFactory(BinaryOperator filterFactory) { diff --git a/src/java.base/share/classes/java/io/ObjectInputStream.java b/src/java.base/share/classes/java/io/ObjectInputStream.java index 983b80d2bc673..60d8cadf6a341 100644 --- a/src/java.base/share/classes/java/io/ObjectInputStream.java +++ b/src/java.base/share/classes/java/io/ObjectInputStream.java @@ -374,17 +374,9 @@ private static class Logging { * When the filter factory {@code apply} method is invoked it may throw a runtime exception * preventing the {@code ObjectInputStream} from being constructed. * - *

If a security manager is installed, this constructor will check for - * the "enableSubclassImplementation" SerializablePermission when invoked - * directly or indirectly by the constructor of a subclass which overrides - * the ObjectInputStream.readFields or ObjectInputStream.readUnshared - * methods. - * * @param in input stream to read from * @throws StreamCorruptedException if the stream header is incorrect * @throws IOException if an I/O error occurs while reading stream header - * @throws SecurityException if untrusted subclass illegally overrides - * security-sensitive methods * @throws IllegalStateException if the initialization of {@link ObjectInputFilter.Config} * fails due to invalid serial filter or serial filter factory properties. * @throws NullPointerException if {@code in} is {@code null} @@ -419,21 +411,11 @@ public ObjectInputStream(InputStream in) throws IOException { * When the filter factory {@code apply} method is invoked it may throw a runtime exception * preventing the {@code ObjectInputStream} from being constructed. * - *

If there is a security manager installed, this method first calls the - * security manager's {@code checkPermission} method with the - * {@code SerializablePermission("enableSubclassImplementation")} - * permission to ensure it's ok to enable subclassing. - * - * @throws SecurityException if a security manager exists and its - * {@code checkPermission} method denies enabling - * subclassing. * @throws IOException if an I/O error occurs while creating this stream * @throws IllegalStateException if the initialization of {@link ObjectInputFilter.Config} * fails due to invalid serial filter or serial filter factory properties. - * @see SecurityManager#checkPermission - * @see java.io.SerializablePermission */ - protected ObjectInputStream() throws IOException, SecurityException { + protected ObjectInputStream() throws IOException { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -599,12 +581,6 @@ protected Object readObjectOverride() * each object (regular or class) read to reconstruct the root object. * See {@link #setObjectInputFilter(ObjectInputFilter) setObjectInputFilter} for details. * - *

ObjectInputStream subclasses which override this method can only be - * constructed in security contexts possessing the - * "enableSubclassImplementation" SerializablePermission; any attempt to - * instantiate such a subclass without this permission will cause a - * SecurityException to be thrown. - * * @return reference to deserialized object * @throws ClassNotFoundException if class of an object to deserialize * cannot be found @@ -923,26 +899,11 @@ protected Object resolveObject(Object obj) throws IOException { * enabled, the {@link #resolveObject} method is called for every object being * deserialized. * - *

If object replacement is currently not enabled, and - * {@code enable} is true, and there is a security manager installed, - * this method first calls the security manager's - * {@code checkPermission} method with the - * {@code SerializablePermission("enableSubstitution")} permission to - * ensure that the caller is permitted to enable the stream to do replacement - * of objects read from the stream. - * * @param enable true for enabling use of {@code resolveObject} for * every object being deserialized * @return the previous setting before this method was invoked - * @throws SecurityException if a security manager exists and its - * {@code checkPermission} method denies enabling the stream - * to do replacement of objects read from the stream. - * @see SecurityManager#checkPermission - * @see java.io.SerializablePermission */ - protected boolean enableResolveObject(boolean enable) - throws SecurityException - { + protected boolean enableResolveObject(boolean enable) { if (enable == enableResolve) { return enable; } @@ -1341,8 +1302,6 @@ public final ObjectInputFilter getObjectInputFilter() { * is increased before reading an object. * * @param filter the filter, may be null - * @throws SecurityException if there is security manager and the - * {@code SerializablePermission("serialFilter")} is not granted * @throws IllegalStateException if an object has been read, * if the filter factory returns {@code null} when the * {@linkplain #getObjectInputFilter() current filter} is non-null, or diff --git a/src/java.base/share/classes/java/io/ObjectOutputStream.java b/src/java.base/share/classes/java/io/ObjectOutputStream.java index bde069a1774d1..429c91ab673b1 100644 --- a/src/java.base/share/classes/java/io/ObjectOutputStream.java +++ b/src/java.base/share/classes/java/io/ObjectOutputStream.java @@ -237,16 +237,8 @@ protected Boolean computeValue(Class type) { * ensure that constructors for receiving ObjectInputStreams will not block * when reading the header. * - *

If a security manager is installed, this constructor will check for - * the "enableSubclassImplementation" SerializablePermission when invoked - * directly or indirectly by the constructor of a subclass which overrides - * the ObjectOutputStream.putFields or ObjectOutputStream.writeUnshared - * methods. - * * @param out output stream to write to * @throws IOException if an I/O error occurs while writing stream header - * @throws SecurityException if untrusted subclass illegally overrides - * security-sensitive methods * @throws NullPointerException if {@code out} is {@code null} * @since 1.4 * @see ObjectOutputStream#ObjectOutputStream() @@ -274,19 +266,9 @@ public ObjectOutputStream(OutputStream out) throws IOException { * ObjectOutputStream to not have to allocate private data just used by * this implementation of ObjectOutputStream. * - *

If there is a security manager installed, this method first calls the - * security manager's {@code checkPermission} method with a - * {@code SerializablePermission("enableSubclassImplementation")} - * permission to ensure it's ok to enable subclassing. - * - * @throws SecurityException if a security manager exists and its - * {@code checkPermission} method denies enabling - * subclassing. * @throws IOException if an I/O error occurs while creating this stream - * @see SecurityManager#checkPermission - * @see java.io.SerializablePermission */ - protected ObjectOutputStream() throws IOException, SecurityException { + protected ObjectOutputStream() throws IOException { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -414,12 +396,6 @@ protected void writeObjectOverride(Object obj) throws IOException { * writeUnshared, and not to any transitively referenced sub-objects in the * object graph to be serialized. * - *

ObjectOutputStream subclasses which override this method can only be - * constructed in security contexts possessing the - * "enableSubclassImplementation" SerializablePermission; any attempt to - * instantiate such a subclass without this permission will cause a - * SecurityException to be thrown. - * * @param obj object to write to stream * @throws NotSerializableException if an object in the graph to be * serialized does not implement the Serializable interface @@ -611,26 +587,11 @@ protected Object replaceObject(Object obj) throws IOException { * enabled, the {@link #replaceObject} method is called for every object being * serialized. * - *

If object replacement is currently not enabled, and - * {@code enable} is true, and there is a security manager installed, - * this method first calls the security manager's - * {@code checkPermission} method with the - * {@code SerializablePermission("enableSubstitution")} permission to - * ensure that the caller is permitted to enable the stream to do replacement - * of objects written to the stream. - * * @param enable true for enabling use of {@code replaceObject} for * every object being serialized * @return the previous setting before this method was invoked - * @throws SecurityException if a security manager exists and its - * {@code checkPermission} method denies enabling the stream - * to do replacement of objects written to the stream. - * @see SecurityManager#checkPermission - * @see java.io.SerializablePermission */ - protected boolean enableReplaceObject(boolean enable) - throws SecurityException - { + protected boolean enableReplaceObject(boolean enable) { if (enable == enableReplace) { return enable; } diff --git a/src/java.base/share/classes/java/io/PrintStream.java b/src/java.base/share/classes/java/io/PrintStream.java index 35e2716dbd324..3096f2356f52f 100644 --- a/src/java.base/share/classes/java/io/PrintStream.java +++ b/src/java.base/share/classes/java/io/PrintStream.java @@ -249,10 +249,6 @@ public PrintStream(OutputStream out, boolean autoFlush, Charset charset) { * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(fileName)} denies write - * access to the file * @see Charset#defaultCharset() * * @since 1.5 @@ -284,11 +280,6 @@ public PrintStream(String fileName) throws FileNotFoundException { * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(fileName)} denies write - * access to the file - * * @throws UnsupportedEncodingException * If the named charset is not supported * @@ -320,11 +311,6 @@ public PrintStream(String fileName, String csn) * @throws IOException * if an I/O error occurs while opening or creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(fileName)} denies write - * access to the file - * * @since 10 */ public PrintStream(String fileName, Charset charset) throws IOException { @@ -351,10 +337,6 @@ public PrintStream(String fileName, Charset charset) throws IOException { * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(file.getPath())} - * denies write access to the file * @see Charset#defaultCharset() * * @since 1.5 @@ -386,11 +368,6 @@ public PrintStream(File file) throws FileNotFoundException { * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(file.getPath())} - * denies write access to the file - * * @throws UnsupportedEncodingException * If the named charset is not supported * @@ -423,11 +400,6 @@ public PrintStream(File file, String csn) * @throws IOException * if an I/O error occurs while opening or creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(file.getPath())} - * denies write access to the file - * * @since 10 */ public PrintStream(File file, Charset charset) throws IOException { diff --git a/src/java.base/share/classes/java/io/PrintWriter.java b/src/java.base/share/classes/java/io/PrintWriter.java index 2ed9315ba6a30..55baa2e0a5701 100644 --- a/src/java.base/share/classes/java/io/PrintWriter.java +++ b/src/java.base/share/classes/java/io/PrintWriter.java @@ -195,10 +195,6 @@ public PrintWriter(OutputStream out, boolean autoFlush, Charset charset) { * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(fileName)} denies write - * access to the file * @see Charset#defaultCharset() * * @since 1.5 @@ -247,11 +243,6 @@ private PrintWriter(Charset charset, File file) * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(fileName)} denies write - * access to the file - * * @throws UnsupportedEncodingException * If the named charset is not supported * @@ -282,11 +273,6 @@ public PrintWriter(String fileName, String csn) * @throws IOException * if an I/O error occurs while opening or creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(fileName)} denies write - * access to the file - * * @since 10 */ public PrintWriter(String fileName, Charset charset) throws IOException { @@ -313,10 +299,6 @@ public PrintWriter(String fileName, Charset charset) throws IOException { * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(file.getPath())} - * denies write access to the file * @see Charset#defaultCharset() * * @since 1.5 @@ -348,11 +330,6 @@ public PrintWriter(File file) throws FileNotFoundException { * created, or if some other error occurs while opening or * creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(file.getPath())} - * denies write access to the file - * * @throws UnsupportedEncodingException * If the named charset is not supported * @@ -383,11 +360,6 @@ public PrintWriter(File file, String csn) * @throws IOException * if an I/O error occurs while opening or creating the file * - * @throws SecurityException - * If a security manager is present and {@link - * SecurityManager#checkWrite checkWrite(file.getPath())} - * denies write access to the file - * * @since 10 */ public PrintWriter(File file, Charset charset) throws IOException { diff --git a/src/java.base/share/classes/java/io/RandomAccessFile.java b/src/java.base/share/classes/java/io/RandomAccessFile.java index cf8ae43dc2147..1487764ac4475 100644 --- a/src/java.base/share/classes/java/io/RandomAccessFile.java +++ b/src/java.base/share/classes/java/io/RandomAccessFile.java @@ -114,15 +114,6 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * specified for the {@code RandomAccessFile(File,String)} constructor. * - *

- * If there is a security manager, its {@code checkRead} method - * is called with the {@code pathname} argument - * as its argument to see if read access to the file is allowed. - * If the mode allows writing, the security manager's - * {@code checkWrite} method - * is also called with the {@code pathname} argument - * as its argument to see if write access to the file is allowed. - * * @param pathname the system-dependent pathname string * @param mode the access mode * @throws IllegalArgumentException if the mode argument is not equal @@ -135,13 +126,6 @@ public class RandomAccessFile implements DataOutput, DataInput, Closeable { * existing, writable regular file and a new regular file of * that pathname cannot be created, or if some other error * occurs while opening or creating the file - * @throws SecurityException if a security manager exists and its - * {@code checkRead} method denies read access to the file - * or the mode is {@code "rw"} and the security manager's - * {@code checkWrite} method denies write access to the file - * @see java.lang.SecurityException - * @see java.lang.SecurityManager#checkRead(java.lang.String) - * @see java.lang.SecurityManager#checkWrite(java.lang.String) */ public RandomAccessFile(String pathname, String mode) throws FileNotFoundException @@ -205,13 +189,6 @@ public RandomAccessFile(String pathname, String mode) * updates to both the file's content and its metadata to be written, which * generally requires at least one more low-level I/O operation. * - *

If there is a security manager, its {@code checkRead} method is - * called with the pathname of the {@code file} argument as its - * argument to see if read access to the file is allowed. If the mode - * allows writing, the security manager's {@code checkWrite} method is - * also called with the pathname of the {@code file} argument to see if - * write access to the file is allowed. - * * @param file the file object * @param mode the access mode, as described * above @@ -225,12 +202,6 @@ public RandomAccessFile(String pathname, String mode) * an existing, writable regular file and a new regular file of * that pathname cannot be created, or if some other error * occurs while opening or creating the file - * @throws SecurityException if a security manager exists and its - * {@code checkRead} method denies read access to the file - * or the mode is {@code "rw"} and the security manager's - * {@code checkWrite} method denies write access to the file - * @see java.lang.SecurityManager#checkRead(java.lang.String) - * @see java.lang.SecurityManager#checkWrite(java.lang.String) * @see java.nio.channels.FileChannel#force(boolean) */ @SuppressWarnings("this-escape") diff --git a/src/java.base/share/classes/java/io/SerializablePermission.java b/src/java.base/share/classes/java/io/SerializablePermission.java index 914b5b13dc3bd..1e617e173a755 100644 --- a/src/java.base/share/classes/java/io/SerializablePermission.java +++ b/src/java.base/share/classes/java/io/SerializablePermission.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2019, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -36,55 +36,9 @@ * no actions list; you either have the named permission * or you don't. * - *

- * The target name is the name of the Serializable permission (see below). - * - *

- * The following table lists the standard {@code SerializablePermission} target names, - * and for each provides a description of what the permission allows - * and a discussion of the risks of granting code the permission. - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - * - *
Permission target name, what the permission allows, and associated risks
Permission Target NameWhat the Permission AllowsRisks of Allowing this Permission
enableSubclassImplementationSubclass implementation of ObjectOutputStream or ObjectInputStream - * to override the default serialization or deserialization, respectively, - * of objectsCode can use this to serialize or - * deserialize classes in a purposefully malfeasant manner. For example, - * during serialization, malicious code can use this to - * purposefully store confidential private field data in a way easily accessible - * to attackers. Or, during deserialization it could, for example, deserialize - * a class with all its private fields zeroed out.
enableSubstitutionSubstitution of one object for another during - * serialization or deserializationThis is dangerous because malicious code - * can replace the actual object with one which has incorrect or - * malignant data.
serialFilterSetting a filter for ObjectInputStreams.Code could remove a configured filter and remove protections - * already established.
+ * @apiNote + * This permission cannot be used for controlling access to resources + * as the Security Manager is no longer supported. * * @see java.security.BasicPermission * @see java.security.Permission @@ -92,7 +46,6 @@ * @see java.security.PermissionCollection * @see java.lang.SecurityManager * - * * @author Joe Fialli * @since 1.2 */ diff --git a/src/java.base/share/classes/java/lang/Boolean.java b/src/java.base/share/classes/java/lang/Boolean.java index 31507f60e3782..f5c643881a883 100644 --- a/src/java.base/share/classes/java/lang/Boolean.java +++ b/src/java.base/share/classes/java/lang/Boolean.java @@ -271,8 +271,6 @@ public boolean equals(Object obj) { * * @param name the system property name. * @return the {@code boolean} value of the system property. - * @throws SecurityException for the same reasons as - * {@link System#getProperty(String) System.getProperty} * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.System#getProperty(java.lang.String, java.lang.String) */ diff --git a/src/java.base/share/classes/java/lang/Class.java b/src/java.base/share/classes/java/lang/Class.java index 2edf0a9169e86..bb091235646bd 100644 --- a/src/java.base/share/classes/java/lang/Class.java +++ b/src/java.base/share/classes/java/lang/Class.java @@ -530,11 +530,6 @@ private static Class forName(String className, Class caller) * by this method fails * @throws ClassNotFoundException if the class cannot be located by * the specified class loader - * @throws SecurityException - * if a security manager is present, and the {@code loader} is - * {@code null}, and the caller's class loader is not - * {@code null}, and the caller does not have the - * {@link RuntimePermission}{@code ("getClassLoader")} * * @see java.lang.Class#forName(String) * @see java.lang.ClassLoader @@ -610,8 +605,6 @@ private static native Class forName0(String name, boolean initialize, * a binary name. This method returns {@code null} on failure rather than * throwing a {@link ClassNotFoundException}, as is done by * the {@link #forName(String, boolean, ClassLoader)} method. - * The security check is a stack-based permission check if the caller - * loads a class in another module. * * @param module A module * @param name The {@linkplain ClassLoader##binary-name binary name} @@ -623,16 +616,6 @@ private static native Class forName0(String name, boolean initialize, * * @throws LinkageError if the linkage fails * - * @throws SecurityException - *

    - *
  • if the caller is not the specified module and - * {@code RuntimePermission("getClassLoader")} permission is denied; or
  • - *
  • access to the module content is denied. For example, - * permission check will be performed when a class loader calls - * {@link ModuleReader#open(String)} to read the bytes of a class file - * in a module.
  • - *
- * * @jls 12.2 Loading of Classes and Interfaces * @jls 12.3 Linking of Classes and Interfaces * @since 9 @@ -756,13 +739,6 @@ public static Class forPrimitiveName(String primitiveName) { * or if the instantiation fails for some other reason. * @throws ExceptionInInitializerError if the initialization * provoked by this method fails. - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. */ @SuppressWarnings("removal") @CallerSensitive @@ -1057,15 +1033,7 @@ public String getName() { * * @return the class loader that loaded the class or interface * represented by this {@code Class} object. - * @throws SecurityException - * if a security manager is present, and the caller's class loader - * is not {@code null} and is not the same as or an ancestor of the - * class loader for the class whose class loader is requested, - * and the caller does not have the - * {@link RuntimePermission}{@code ("getClassLoader")} * @see java.lang.ClassLoader - * @see SecurityManager#checkPermission - * @see java.lang.RuntimePermission */ @CallerSensitive @ForceInline // to ensure Reflection.getCallerClass optimization @@ -1541,30 +1509,10 @@ void setSigners(Object[] signers) { * @return the immediately enclosing method of the underlying class, if * that class is a local or anonymous class; otherwise {@code null}. * - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of the enclosing class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the methods within the enclosing class - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the enclosing class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of the enclosing class - * - *
* @since 1.5 */ @CallerSensitive - public Method getEnclosingMethod() throws SecurityException { + public Method getEnclosingMethod() { EnclosingMethodInfo enclosingInfo = getEnclosingMethodInfo(); if (enclosingInfo == null) @@ -1697,30 +1645,11 @@ private static Class toClass(Type o) { * * @return the immediately enclosing constructor of the underlying class, if * that class is a local or anonymous class; otherwise {@code null}. - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of the enclosing class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the constructors within the enclosing class - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the enclosing class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of the enclosing class - * - *
+ * * @since 1.5 */ @CallerSensitive - public Constructor getEnclosingConstructor() throws SecurityException { + public Constructor getEnclosingConstructor() { EnclosingMethodInfo enclosingInfo = getEnclosingMethodInfo(); if (enclosingInfo == null) @@ -1777,16 +1706,10 @@ public Constructor getEnclosingConstructor() throws SecurityException { * type, or void, then this method returns null. * * @return the declaring class for this class - * @throws SecurityException - * If a security manager, s, is present and the caller's - * class loader is not the same as or an ancestor of the class - * loader for the declaring class and invocation of {@link - * SecurityManager#checkPackageAccess s.checkPackageAccess()} - * denies access to the package of the declaring class * @since 1.1 */ @CallerSensitive - public Class getDeclaringClass() throws SecurityException { + public Class getDeclaringClass() { final Class candidate = getDeclaringClass0(); if (candidate != null) { @@ -1808,16 +1731,10 @@ public Class getDeclaringClass() throws SecurityException { * class. If the underlying class is a top level class this * method returns {@code null}. * @return the immediately enclosing class of the underlying class - * @throws SecurityException - * If a security manager, s, is present and the caller's - * class loader is not the same as or an ancestor of the class - * loader for the enclosing class and invocation of {@link - * SecurityManager#checkPackageAccess s.checkPackageAccess()} - * denies access to the package of the enclosing class * @since 1.5 */ @CallerSensitive - public Class getEnclosingClass() throws SecurityException { + public Class getEnclosingClass() { // There are five kinds of classes (or interfaces): // a) Top level classes // b) Nested classes (static member classes) @@ -2072,14 +1989,6 @@ private boolean hasEnclosingMethodInfo() { * * @return the array of {@code Class} objects representing the public * members of this class - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. - * * @since 1.1 */ @SuppressWarnings("removal") @@ -2140,20 +2049,13 @@ public Class[] run() { * * @return the array of {@code Field} objects representing the * public fields - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. * * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @CallerSensitive - public Field[] getFields() throws SecurityException { + public Field[] getFields() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2231,20 +2133,13 @@ public Field[] getFields() throws SecurityException { * * @return the array of {@code Method} objects representing the * public methods of this class - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. * * @jls 8.2 Class Members * @jls 8.4 Method Declarations * @since 1.1 */ @CallerSensitive - public Method[] getMethods() throws SecurityException { + public Method[] getMethods() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2274,19 +2169,12 @@ public Method[] getMethods() throws SecurityException { * * @return the array of {@code Constructor} objects representing the * public constructors of this class - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. * * @see #getDeclaredConstructors() * @since 1.1 */ @CallerSensitive - public Constructor[] getConstructors() throws SecurityException { + public Constructor[] getConstructors() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2326,21 +2214,13 @@ public Constructor[] getConstructors() throws SecurityException { * @throws NoSuchFieldException if a field with the specified name is * not found. * @throws NullPointerException if {@code name} is {@code null} - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. * * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @CallerSensitive - public Field getField(String name) - throws NoSuchFieldException, SecurityException { + public Field getField(String name) throws NoSuchFieldException { Objects.requireNonNull(name); @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); @@ -2437,13 +2317,6 @@ public Field getField(String name) * or if the name is {@value ConstantDescs#INIT_NAME} or * {@value ConstantDescs#CLASS_INIT_NAME}. * @throws NullPointerException if {@code name} is {@code null} - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. * * @jls 8.2 Class Members * @jls 8.4 Method Declarations @@ -2451,7 +2324,7 @@ public Field getField(String name) */ @CallerSensitive public Method getMethod(String name, Class... parameterTypes) - throws NoSuchMethodException, SecurityException { + throws NoSuchMethodException { Objects.requireNonNull(name); @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); @@ -2486,21 +2359,13 @@ public Method getMethod(String name, Class... parameterTypes) * @throws NoSuchMethodException if a matching constructor is not found, * including when this {@code Class} object represents * an interface, a primitive type, an array class, or void. - * @throws SecurityException - * If a security manager, s, is present and - * the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class. - * - * @see #getDeclaredConstructor(Class[]) + * + * @see #getDeclaredConstructor(Class[]) * @since 1.1 */ @CallerSensitive public Constructor getConstructor(Class... parameterTypes) - throws NoSuchMethodException, SecurityException - { + throws NoSuchMethodException { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2523,32 +2388,12 @@ public Constructor getConstructor(Class... parameterTypes) * * @return the array of {@code Class} objects representing all the * declared members of this class - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared classes within this class - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class - * - *
* * @since 1.1 * @jls 8.5 Member Class and Interface Declarations */ @CallerSensitive - public Class[] getDeclaredClasses() throws SecurityException { + public Class[] getDeclaredClasses() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2575,33 +2420,13 @@ public Class[] getDeclaredClasses() throws SecurityException { * * @return the array of {@code Field} objects representing all the * declared fields of this class - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared fields within this class - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class - * - *
* * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @CallerSensitive - public Field[] getDeclaredFields() throws SecurityException { + public Field[] getDeclaredFields() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2638,26 +2463,6 @@ public Field[] getDeclaredFields() throws SecurityException { * @return An array of {@code RecordComponent} objects representing all the * record components of this record class, or {@code null} if this * class is not a record class - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared methods within this class - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class - * - *
* * @jls 8.10 Record Classes * @since 16 @@ -2706,26 +2511,6 @@ public RecordComponent[] getRecordComponents() { * * @return the array of {@code Method} objects representing all the * declared methods of this class - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared methods within this class - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class - * - *
* * @jls 8.2 Class Members * @jls 8.4 Method Declarations @@ -2735,7 +2520,7 @@ public RecordComponent[] getRecordComponents() { * @since 1.1 */ @CallerSensitive - public Method[] getDeclaredMethods() throws SecurityException { + public Method[] getDeclaredMethods() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2760,33 +2545,13 @@ public Method[] getDeclaredMethods() throws SecurityException { * * @return the array of {@code Constructor} objects representing all the * declared constructors of this class - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared constructors within this class - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class - * - *
* * @since 1.1 * @see #getConstructors() * @jls 8.8 Constructor Declarations */ @CallerSensitive - public Constructor[] getDeclaredConstructors() throws SecurityException { + public Constructor[] getDeclaredConstructors() { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -2811,34 +2576,13 @@ public Constructor[] getDeclaredConstructors() throws SecurityException { * @throws NoSuchFieldException if a field with the specified name is * not found. * @throws NullPointerException if {@code name} is {@code null} - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared field - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class - * - *
* * @since 1.1 * @jls 8.2 Class Members * @jls 8.3 Field Declarations */ @CallerSensitive - public Field getDeclaredField(String name) - throws NoSuchFieldException, SecurityException { + public Field getDeclaredField(String name) throws NoSuchFieldException { Objects.requireNonNull(name); @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); @@ -2877,26 +2621,6 @@ public Field getDeclaredField(String name) * matching the specified name and parameters * @throws NoSuchMethodException if a matching method is not found. * @throws NullPointerException if {@code name} is {@code null} - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared method - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class - * - *
* * @jls 8.2 Class Members * @jls 8.4 Method Declarations @@ -2904,7 +2628,7 @@ public Field getDeclaredField(String name) */ @CallerSensitive public Method getDeclaredMethod(String name, Class... parameterTypes) - throws NoSuchMethodException, SecurityException { + throws NoSuchMethodException { Objects.requireNonNull(name); @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); @@ -2975,34 +2699,13 @@ Method findMethod(boolean publicOnly, String name, Class... parameterTypes) { * @throws NoSuchMethodException if a matching constructor is not found, * including when this {@code Class} object represents * an interface, a primitive type, an array class, or void. - * @throws SecurityException - * If a security manager, s, is present and any of the - * following conditions is met: - * - *
    - * - *
  • the caller's class loader is not the same as the - * class loader of this class and invocation of - * {@link SecurityManager#checkPermission - * s.checkPermission} method with - * {@code RuntimePermission("accessDeclaredMembers")} - * denies access to the declared constructor - * - *
  • the caller's class loader is not the same as or an - * ancestor of the class loader for the current class and - * invocation of {@link SecurityManager#checkPackageAccess - * s.checkPackageAccess()} denies access to the package - * of this class * - *
- * - * @see #getConstructor(Class[]) + * @see #getConstructor(Class[]) * @since 1.1 */ @CallerSensitive public Constructor getDeclaredConstructor(Class... parameterTypes) - throws NoSuchMethodException, SecurityException - { + throws NoSuchMethodException { @SuppressWarnings("removal") SecurityManager sm = System.getSecurityManager(); if (sm != null) { @@ -3058,10 +2761,9 @@ public Constructor getDeclaredConstructor(Class... parameterTypes) * * @param name name of the desired resource * @return A {@link java.io.InputStream} object; {@code null} if no - * resource with this name is found, the resource is in a package + * resource with this name is found, or the resource is in a package * that is not {@linkplain Module#isOpen(String, Module) open} to at - * least the caller module, or access to the resource is denied - * by the security manager. + * least the caller module. * @throws NullPointerException If {@code name} is {@code null} * * @see Module#getResourceAsStream(String) @@ -3154,11 +2856,10 @@ public InputStream getResourceAsStream(String name) { * * @param name name of the desired resource * @return A {@link java.net.URL} object; {@code null} if no resource with - * this name is found, the resource cannot be located by a URL, the + * this name is found, the resource cannot be located by a URL, or the * resource is in a package that is not * {@linkplain Module#isOpen(String, Module) open} to at least the caller - * module, or access to the resource is denied by the security - * manager. + * module. * @throws NullPointerException If {@code name} is {@code null} * @since 1.1 */ @@ -3224,23 +2925,11 @@ private boolean isOpenToCaller(String name, Class caller) { } /** - * Returns the {@code ProtectionDomain} of this class. If there is a - * security manager installed, this method first calls the security - * manager's {@code checkPermission} method with a - * {@code RuntimePermission("getProtectionDomain")} permission to - * ensure it's ok to get the - * {@code ProtectionDomain}. + * Returns the {@code ProtectionDomain} of this class. * * @return the ProtectionDomain of this class * - * @throws SecurityException - * if a security manager exists and its - * {@code checkPermission} method doesn't allow - * getting the ProtectionDomain. - * * @see java.security.ProtectionDomain - * @see SecurityManager#checkPermission - * @see java.lang.RuntimePermission * @since 1.2 */ public ProtectionDomain getProtectionDomain() { @@ -4466,13 +4155,6 @@ public AnnotatedType[] getAnnotatedInterfaces() { * * @return the nest host of this class or interface * - * @throws SecurityException - * If the returned class is not the current class, and - * if a security manager, s, is present and the caller's - * class loader is not the same as or an ancestor of the class - * loader for the returned class and invocation of {@link - * SecurityManager#checkPackageAccess s.checkPackageAccess()} - * denies access to the package of the returned class * @since 11 * @jvms 4.7.28 The {@code NestHost} Attribute * @jvms 4.7.29 The {@code NestMembers} Attribute @@ -4557,14 +4239,6 @@ public boolean isNestmateOf(Class c) { * @return an array of all classes and interfaces in the same nest as * this class or interface * - * @throws SecurityException - * If any returned class is not the current class, and - * if a security manager, s, is present and the caller's - * class loader is not the same as or an ancestor of the class - * loader for that returned class and invocation of {@link - * SecurityManager#checkPackageAccess s.checkPackageAccess()} - * denies access to the package of that returned class - * * @since 11 * @see #getNestHost() * @jvms 4.7.28 The {@code NestHost} Attribute @@ -4751,15 +4425,8 @@ public Optional describeConstable() { * cannot be obtained, it is silently ignored, and not included in the result * array. * - * @return an array of {@code Class} objects of the permitted subclasses of this class or interface, - * or {@code null} if this class or interface is not sealed. - * - * @throws SecurityException - * If a security manager, s, is present and the caller's - * class loader is not the same as or an ancestor of the class - * loader for that returned class and invocation of {@link - * SecurityManager#checkPackageAccess s.checkPackageAccess()} - * denies access to the package of any class in the returned array. + * @return an array of {@code Class} objects of the permitted subclasses of this class + * or interface, or {@code null} if this class or interface is not sealed. * * @jls 8.1 Class Declarations * @jls 9.1 Interface Declarations diff --git a/src/java.base/share/classes/java/lang/ClassLoader.java b/src/java.base/share/classes/java/lang/ClassLoader.java index fafa8895ee667..85fc315c76715 100644 --- a/src/java.base/share/classes/java/lang/ClassLoader.java +++ b/src/java.base/share/classes/java/lang/ClassLoader.java @@ -33,10 +33,7 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.net.URL; -import java.security.AccessController; -import java.security.AccessControlContext; import java.security.CodeSource; -import java.security.PrivilegedAction; import java.security.ProtectionDomain; import java.security.cert.Certificate; import java.util.ArrayList; @@ -67,7 +64,6 @@ import jdk.internal.reflect.CallerSensitiveAdapter; import jdk.internal.reflect.Reflection; import jdk.internal.util.StaticProperty; -import sun.reflect.misc.ReflectUtil; import sun.security.util.SecurityConstants; /** @@ -93,9 +89,6 @@ * extend the manner in which the Java virtual machine dynamically loads * classes. * - *

Class loaders may typically be used by security managers to indicate - * security domains. - * *

In addition to loading classes, a class loader is also responsible for * locating resources. A resource is some data (a "{@code .class}" file, * configuration data, or an image for example) that is identified with an @@ -424,11 +417,6 @@ String nameAndId() { * * @throws IllegalArgumentException if the given name is empty. * - * @throws SecurityException - * If a security manager exists and its - * {@link SecurityManager#checkCreateClassLoader()} - * method doesn't allow creation of a new class loader. - * * @since 9 */ @SuppressWarnings("this-escape") @@ -440,10 +428,6 @@ protected ClassLoader(String name, ClassLoader parent) { * Creates a new class loader using the specified parent class loader for * delegation. * - *

If there is a security manager, its {@link - * SecurityManager#checkCreateClassLoader() checkCreateClassLoader} method - * is invoked. This may result in a security exception.

- * * @apiNote If the parent is specified as {@code null} (for the * bootstrap class loader) then there is no guarantee that all platform * classes are visible. @@ -451,11 +435,6 @@ protected ClassLoader(String name, ClassLoader parent) { * @param parent * The parent class loader * - * @throws SecurityException - * If a security manager exists and its - * {@code checkCreateClassLoader} method doesn't allow creation - * of a new class loader. - * * @since 1.2 */ @SuppressWarnings("this-escape") @@ -467,16 +446,6 @@ protected ClassLoader(ClassLoader parent) { * Creates a new class loader using the {@code ClassLoader} returned by * the method {@link #getSystemClassLoader() * getSystemClassLoader()} as the parent class loader. - * - *

If there is a security manager, its {@link - * SecurityManager#checkCreateClassLoader() - * checkCreateClassLoader} method is invoked. This may result in - * a security exception.

- * - * @throws SecurityException - * If a security manager exists and its - * {@code checkCreateClassLoader} method doesn't allow creation - * of a new class loader. */ @SuppressWarnings("this-escape") protected ClassLoader() { @@ -688,30 +657,6 @@ protected Object getClassLoadingLock(String className) { return lock; } - // Invoked by the VM after loading class with this loader. - @SuppressWarnings("removal") - private void checkPackageAccess(Class cls, ProtectionDomain pd) { - final SecurityManager sm = System.getSecurityManager(); - if (sm != null) { - if (ReflectUtil.isNonPublicProxyClass(cls)) { - for (Class intf: cls.getInterfaces()) { - checkPackageAccess(intf, pd); - } - return; - } - - final String packageName = cls.getPackageName(); - if (!packageName.isEmpty()) { - AccessController.doPrivileged(new PrivilegedAction<>() { - public Void run() { - sm.checkPackageAccess(packageName); - return null; - } - }, new AccessControlContext(new ProtectionDomain[] {pd})); - } - } - } - /** * Finds the class with the specified binary name. * This method should be overridden by class loader implementations that @@ -823,12 +768,10 @@ protected final Class defineClass(byte[] b, int off, int len) * Before the {@code Class} can be used it must be resolved. * *

This method assigns a default {@link java.security.ProtectionDomain - * ProtectionDomain} to the newly defined class. The - * {@code ProtectionDomain} is effectively granted the same set of - * permissions returned when {@link - * java.security.Policy#getPermissions(java.security.CodeSource) - * Policy.getPolicy().getPermissions(new CodeSource(null, null))} - * is invoked. The default protection domain is created on the first invocation + * ProtectionDomain} to the newly defined class. The + * {@code getPermissions} method of the {@code ProtectionDomain} always + * returns {@code null}. + * The default protection domain is created on the first invocation * of {@link #defineClass(String, byte[], int, int) defineClass}, * and re-used on subsequent invocations. * @@ -1342,8 +1285,7 @@ protected final void setSigners(Class c, Object[] signers) { * The resource name * * @return A URL to the resource; {@code null} if the resource could not be - * found, a URL could not be constructed to locate the resource, - * access to the resource is denied by the security manager, or + * found, a URL could not be constructed to locate the resource, or * there isn't a module of the given name defined to the class * loader. * @@ -1395,9 +1337,8 @@ protected URL findResource(String moduleName, String name) throws IOException { * * @return {@code URL} object for reading the resource; {@code null} if * the resource could not be found, a {@code URL} could not be - * constructed to locate the resource, the resource is in a package - * that is not opened unconditionally, or access to the resource is - * denied by the security manager. + * constructed to locate the resource, or the resource is in a package + * that is not opened unconditionally. * * @throws NullPointerException If {@code name} is {@code null} * @@ -1457,9 +1398,8 @@ public URL getResource(String name) { * @return An enumeration of {@link java.net.URL URL} objects for the * resource. If no resources could be found, the enumeration will * be empty. Resources for which a {@code URL} cannot be - * constructed, are in a package that is not opened - * unconditionally, or access to the resource is denied by the - * security manager, are not returned in the enumeration. + * constructed, or are in a package that is not opened + * unconditionally, are not returned in the enumeration. * * @throws IOException * If I/O errors occur @@ -1518,9 +1458,8 @@ public Enumeration getResources(String name) throws IOException { * * @return A stream of resource {@link java.net.URL URL} objects. If no * resources could be found, the stream will be empty. Resources - * for which a {@code URL} cannot be constructed, are in a package - * that is not opened unconditionally, or access to the resource - * is denied by the security manager, will not be in the stream. + * for which a {@code URL} cannot be constructed, or are in a package + * that is not opened unconditionally, will not be in the stream. * * @throws NullPointerException If {@code name} is {@code null} * @@ -1558,9 +1497,8 @@ public Stream resources(String name) { * * @return {@code URL} object for reading the resource; {@code null} if * the resource could not be found, a {@code URL} could not be - * constructed to locate the resource, the resource is in a package - * that is not opened unconditionally, or access to the resource is - * denied by the security manager. + * constructed to locate the resource, or the resource is in a package + * that is not opened unconditionally. * * @since 1.2 */ @@ -1589,8 +1527,7 @@ protected URL findResource(String name) { * @return An enumeration of {@link java.net.URL URL} objects for * the resource. If no resources could be found, the enumeration * will be empty. Resources for which a {@code URL} cannot be - * constructed, are in a package that is not opened unconditionally, - * or access to the resource is denied by the security manager, + * constructed, or are in a package that is not opened unconditionally, * are not returned in the enumeration. * * @throws IOException @@ -1676,9 +1613,8 @@ public final boolean isRegisteredAsParallelCapable() { * * @return A {@link java.net.URL URL} to the resource; {@code * null} if the resource could not be found, a URL could not be - * constructed to locate the resource, the resource is in a package - * that is not opened unconditionally or access to the resource is - * denied by the security manager. + * constructed to locate the resource, or the resource is in a package + * that is not opened unconditionally. * * @since 1.1 */ @@ -1708,8 +1644,7 @@ public static URL getSystemResource(String name) { * @return An enumeration of {@link java.net.URL URL} objects for * the resource. If no resources could be found, the enumeration * will be empty. Resources for which a {@code URL} cannot be - * constructed, are in a package that is not opened unconditionally, - * or access to the resource is denied by the security manager, + * constructed, or are in a package that is not opened unconditionally, * are not returned in the enumeration. * * @throws IOException @@ -1740,9 +1675,8 @@ public static Enumeration getSystemResources(String name) * The resource name * * @return An input stream for reading the resource; {@code null} if the - * resource could not be found, the resource is in a package that - * is not opened unconditionally, or access to the resource is - * denied by the security manager. + * resource could not be found, or the resource is in a package that + * is not opened unconditionally. * * @throws NullPointerException If {@code name} is {@code null} * @@ -1774,9 +1708,8 @@ public InputStream getResourceAsStream(String name) { * The resource name * * @return An input stream for reading the resource; {@code null} if the - * resource could not be found, the resource is in a package that - * is not opened unconditionally, or access to the resource is - * denied by the security manager. + * resource could not be found, or the resource is in a package that + * is not opened unconditionally. * * @since 1.1 */ @@ -1800,12 +1733,6 @@ public static InputStream getSystemResourceAsStream(String name) { * * @return The parent {@code ClassLoader} * - * @throws SecurityException - * If a security manager is present, and the caller's class loader - * is not {@code null} and is not an ancestor of this class loader, - * and the caller does not have the - * {@link RuntimePermission}{@code ("getClassLoader")} - * * @since 1.2 */ @CallerSensitive @@ -1845,13 +1772,6 @@ public final Module getUnnamedModule() { * * @return The platform {@code ClassLoader}. * - * @throws SecurityException - * If a security manager is present, and the caller's class loader is - * not {@code null}, and the caller's class loader is not the same - * as or an ancestor of the platform class loader, - * and the caller does not have the - * {@link RuntimePermission}{@code ("getClassLoader")} - * * @since 9 */ @CallerSensitive @@ -1920,12 +1840,6 @@ public static ClassLoader getPlatformClassLoader() { * * @return The system {@code ClassLoader} * - * @throws SecurityException - * If a security manager is present, and the caller's class loader - * is not {@code null} and is not the same as or an ancestor of the - * system class loader, and the caller does not have the - * {@link RuntimePermission}{@code ("getClassLoader")} - * * @throws IllegalStateException * If invoked recursively during the construction of the class * loader specified by the "{@code java.system.class.loader}" diff --git a/src/java.base/share/classes/java/lang/Integer.java b/src/java.base/share/classes/java/lang/Integer.java index e666e977c61a5..8bf573733f2ce 100644 --- a/src/java.base/share/classes/java/lang/Integer.java +++ b/src/java.base/share/classes/java/lang/Integer.java @@ -1187,8 +1187,6 @@ public boolean equals(Object obj) { * * @param nm property name. * @return the {@code Integer} value of the property. - * @throws SecurityException for the same reasons as - * {@link System#getProperty(String) System.getProperty} * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.System#getProperty(java.lang.String, java.lang.String) */ @@ -1233,8 +1231,6 @@ public static Integer getInteger(String nm) { * @param nm property name. * @param val default value. * @return the {@code Integer} value of the property. - * @throws SecurityException for the same reasons as - * {@link System#getProperty(String) System.getProperty} * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.System#getProperty(java.lang.String, java.lang.String) */ @@ -1275,8 +1271,6 @@ public static Integer getInteger(String nm, int val) { * @param nm property name. * @param val default value. * @return the {@code Integer} value of the property. - * @throws SecurityException for the same reasons as - * {@link System#getProperty(String) System.getProperty} * @see System#getProperty(java.lang.String) * @see System#getProperty(java.lang.String, java.lang.String) */ diff --git a/src/java.base/share/classes/java/lang/Long.java b/src/java.base/share/classes/java/lang/Long.java index 8c083b3ec8431..e67b751470e48 100644 --- a/src/java.base/share/classes/java/lang/Long.java +++ b/src/java.base/share/classes/java/lang/Long.java @@ -1276,8 +1276,6 @@ public boolean equals(Object obj) { * * @param nm property name. * @return the {@code Long} value of the property. - * @throws SecurityException for the same reasons as - * {@link System#getProperty(String) System.getProperty} * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.System#getProperty(java.lang.String, java.lang.String) */ @@ -1321,8 +1319,6 @@ public static Long getLong(String nm) { * @param nm property name. * @param val default value. * @return the {@code Long} value of the property. - * @throws SecurityException for the same reasons as - * {@link System#getProperty(String) System.getProperty} * @see java.lang.System#getProperty(java.lang.String) * @see java.lang.System#getProperty(java.lang.String, java.lang.String) */ @@ -1370,8 +1366,6 @@ public static Long getLong(String nm, long val) { * @param nm property name. * @param val default value. * @return the {@code Long} value of the property. - * @throws SecurityException for the same reasons as - * {@link System#getProperty(String) System.getProperty} * @see System#getProperty(java.lang.String) * @see System#getProperty(java.lang.String, java.lang.String) */ diff --git a/src/java.base/share/classes/java/lang/Module.java b/src/java.base/share/classes/java/lang/Module.java index 4d4593b31974f..a90fbc992602b 100644 --- a/src/java.base/share/classes/java/lang/Module.java +++ b/src/java.base/share/classes/java/lang/Module.java @@ -195,15 +195,7 @@ public String getName() { /** * Returns the {@code ClassLoader} for this module. * - *

If there is a security manager then its {@code checkPermission} - * method if first called with a {@code RuntimePermission("getClassLoader")} - * permission to check that the caller is allowed to get access to the - * class loader.

- * * @return The class loader for this module - * - * @throws SecurityException - * If denied by the security manager */ public ClassLoader getClassLoader() { @SuppressWarnings("removal") @@ -1689,9 +1681,8 @@ protected Class loadClass(String cn, boolean resolve) * with the name "{@code META-INF/MANIFEST.MF}" is never encapsulated * because "{@code META-INF}" is not a legal package name.

* - *

This method returns {@code null} if the resource is not in this - * module, the resource is encapsulated and cannot be located by the caller, - * or access to the resource is denied by the security manager.

+ *

This method returns {@code null} if the resource is not in this module + * or the resource is encapsulated and cannot be located by the caller.

* * @param name * The resource name diff --git a/src/java.base/share/classes/java/lang/ModuleLayer.java b/src/java.base/share/classes/java/lang/ModuleLayer.java index 80d392470cb33..4ee2b02414dee 100644 --- a/src/java.base/share/classes/java/lang/ModuleLayer.java +++ b/src/java.base/share/classes/java/lang/ModuleLayer.java @@ -359,10 +359,6 @@ public Controller enableNativeAccess(Module target) { * @throws LayerInstantiationException * If the layer cannot be created for any of the reasons specified * by the static {@code defineModulesWithOneLoader} method - * @throws SecurityException - * If {@code RuntimePermission("createClassLoader")} or - * {@code RuntimePermission("getClassLoader")} is denied by - * the security manager * * @see #findLoader */ @@ -401,10 +397,6 @@ public ModuleLayer defineModulesWithOneLoader(Configuration cf, * @throws LayerInstantiationException * If the layer cannot be created for any of the reasons specified * by the static {@code defineModulesWithManyLoaders} method - * @throws SecurityException - * If {@code RuntimePermission("createClassLoader")} or - * {@code RuntimePermission("getClassLoader")} is denied by - * the security manager * * @see #findLoader */ @@ -440,9 +432,6 @@ public ModuleLayer defineModulesWithManyLoaders(Configuration cf, * @throws LayerInstantiationException * If the layer cannot be created for any of the reasons specified * by the static {@code defineModules} method - * @throws SecurityException - * If {@code RuntimePermission("getClassLoader")} is denied by - * the security manager */ public ModuleLayer defineModules(Configuration cf, Function clf) { @@ -490,10 +479,6 @@ public ModuleLayer defineModules(Configuration cf, * a module named "{@code java.base}", or a module contains a package named * "{@code java}" or a package with a name starting with "{@code java.}".

* - *

If there is a security manager then the class loader created by - * this method will load classes and resources with privileges that are - * restricted by the calling context of this method.

- * * @param cf * The configuration for the layer * @param parentLayers @@ -510,10 +495,6 @@ public ModuleLayer defineModules(Configuration cf, * @throws LayerInstantiationException * If all modules cannot be defined to the same class loader for any * of the reasons listed above - * @throws SecurityException - * If {@code RuntimePermission("createClassLoader")} or - * {@code RuntimePermission("getClassLoader")} is denied by - * the security manager * * @see #findLoader */ @@ -563,10 +544,6 @@ public static Controller defineModulesWithOneLoader(Configuration cf, * methods) in the module defined to the class loader before searching * the parent class loader.

* - *

If there is a security manager then the class loaders created by - * this method will load classes and resources with privileges that are - * restricted by the calling context of this method.

- * * @param cf * The configuration for the layer * @param parentLayers @@ -586,11 +563,6 @@ public static Controller defineModulesWithOneLoader(Configuration cf, * named "{@code java}" or a package with a name starting with * "{@code java.}" * - * @throws SecurityException - * If {@code RuntimePermission("createClassLoader")} or - * {@code RuntimePermission("getClassLoader")} is denied by - * the security manager - * * @see #findLoader */ public static Controller defineModulesWithManyLoaders(Configuration cf, @@ -673,9 +645,6 @@ public static Controller defineModulesWithManyLoaders(Configuration cf, * configuration of the parent layers, including order * @throws LayerInstantiationException * If creating the layer fails for any of the reasons listed above - * @throws SecurityException - * If {@code RuntimePermission("getClassLoader")} is denied by - * the security manager */ public static Controller defineModules(Configuration cf, List parentLayers, @@ -906,11 +875,6 @@ boolean addEnableNativeAccess(String name) { * parent} layers are searched in the manner specified by {@link * #findModule(String) findModule}. * - *

If there is a security manager then its {@code checkPermission} - * method is called with a {@code RuntimePermission("getClassLoader")} - * permission to check that the caller is allowed to get access to the - * class loader.

- * * @apiNote This method does not return an {@code Optional} * because `null` must be used to represent the bootstrap class loader. * @@ -921,8 +885,6 @@ boolean addEnableNativeAccess(String name) { * * @throws IllegalArgumentException if a module of the given name is not * defined in this layer or any parent of this layer - * - * @throws SecurityException if denied by the security manager */ public ClassLoader findLoader(String name) { Optional om = findModule(name); diff --git a/src/java.base/share/classes/java/lang/Process.java b/src/java.base/share/classes/java/lang/Process.java index af6753a236bb2..3e4837d2e0253 100644 --- a/src/java.base/share/classes/java/lang/Process.java +++ b/src/java.base/share/classes/java/lang/Process.java @@ -753,8 +753,7 @@ public boolean isReleasable() { * * {@code Process} objects returned by {@link ProcessBuilder#start()} and * {@link Runtime#exec} implement {@code toHandle} as the equivalent of - * {@link ProcessHandle#of(long) ProcessHandle.of(pid)} including the - * check for a SecurityManager and {@code RuntimePermission("manageProcess")}. + * {@link ProcessHandle#of(long) ProcessHandle.of(pid)}. * * @implSpec * This implementation throws an instance of @@ -766,8 +765,6 @@ public boolean isReleasable() { * @return Returns a ProcessHandle for the Process * @throws UnsupportedOperationException if the Process implementation * does not support this operation - * @throws SecurityException if a security manager has been installed and - * it denies RuntimePermission("manageProcess") * @since 9 */ public ProcessHandle toHandle() { @@ -811,8 +808,6 @@ public ProcessHandle.Info info() { * direct children of the process * @throws UnsupportedOperationException if the Process implementation * does not support this operation - * @throws SecurityException if a security manager has been installed and - * it denies RuntimePermission("manageProcess") * @since 9 */ public Stream children() { @@ -837,8 +832,6 @@ public Stream children() { * are descendants of the process * @throws UnsupportedOperationException if the Process implementation * does not support this operation - * @throws SecurityException if a security manager has been installed and - * it denies RuntimePermission("manageProcess") * @since 9 */ public Stream descendants() { diff --git a/src/java.base/share/classes/java/lang/ProcessBuilder.java b/src/java.base/share/classes/java/lang/ProcessBuilder.java index e7d5d9debef69..c3cb9bfd14515 100644 --- a/src/java.base/share/classes/java/lang/ProcessBuilder.java +++ b/src/java.base/share/classes/java/lang/ProcessBuilder.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -329,23 +329,12 @@ public List command() { * *

The returned map is typically case-sensitive on all platforms. * - *

If a security manager exists, its - * {@link SecurityManager#checkPermission checkPermission} method - * is called with a - * {@link RuntimePermission}{@code ("getenv.*")} permission. - * This may result in a {@link SecurityException} being thrown. - * *

When passing information to a Java subprocess, * system properties * are generally preferred over environment variables. * * @return this process builder's environment * - * @throws SecurityException - * if a security manager exists and its - * {@link SecurityManager#checkPermission checkPermission} - * method doesn't allow access to the process environment - * * @see Runtime#exec(String[],String[],java.io.File) * @see System#getenv() */ @@ -1009,12 +998,6 @@ public ProcessBuilder redirectErrorStream(boolean redirectErrorStream) { * The minimal set of system dependent environment variables * may override the values provided in the environment. * - *

If there is a security manager, its - * {@link SecurityManager#checkExec checkExec} - * method is called with the first component of this object's - * {@code command} array as its argument. This may result in - * a {@link SecurityException} being thrown. - * *

Starting an operating system process is highly system-dependent. * Among the many things that can go wrong are: *