File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/services Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,21 @@ public void duringSetup(final DuringSetupAccess access) {
6363 }
6464 }
6565
66+ /**
67+ * This test ensures that the list of security providers is populated at run time, and not at
68+ * build time.
69+ */
70+ @ Test
71+ public void testSecurityProviderRuntimeRegistration () {
72+ Provider notRegistered = Security .getProvider ("no-op-provider" );
73+ Assert .assertNull ("Provider is registered." , notRegistered );
74+
75+ Security .addProvider (new NoOpProvider ());
76+
77+ Provider registered = Security .getProvider ("no-op-provider" );
78+ Assert .assertNotNull ("Provider is not registered." , registered );
79+ }
80+
6681 /**
6782 * Tests that native-image generation doesn't run into an issue (like NPE) if the application
6883 * uses a java.security.Provider.Service which isn't part of the services shipped in the JDK.
You can’t perform that action at this time.
0 commit comments