File tree 1 file changed +15
-0
lines changed
substratevm/src/com.oracle.svm.test/src/com/oracle/svm/test/services
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) {
63
63
}
64
64
}
65
65
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
+
66
81
/**
67
82
* Tests that native-image generation doesn't run into an issue (like NPE) if the application
68
83
* 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