6666import com .oracle .svm .util .ReflectionUtil ;
6767
6868import jdk .graal .compiler .core .common .SuppressFBWarnings ;
69- import jdk .graal .compiler .serviceprovider .JavaVersionUtil ;
7069import sun .security .util .Debug ;
7170import sun .security .util .SecurityConstants ;
7271
@@ -471,7 +470,6 @@ final class Target_sun_security_jca_ProviderConfig {
471470 * reachable via a security service.
472471 */
473472 @ Substitute
474- @ SuppressWarnings ("fallthrough" )
475473 @ SuppressFBWarnings (value = "DC_DOUBLECHECK" , justification = "This double-check is implemented correctly and is intentional." )
476474 Provider getProvider () {
477475 // volatile variable load
@@ -508,6 +506,11 @@ Provider getProvider() {
508506 p = support .isSecurityProviderExpected ("SunJSSE" , "sun.security.ssl.SunJSSE" ) ? new sun .security .ssl .SunJSSE () : null ;
509507 break ;
510508 }
509+ case "SunEC" : {
510+ // Constructor inside method and then allocate. ModuleSupport to open.
511+ p = support .isSecurityProviderExpected ("SunEC" , "sun.security.ec.SunEC" ) ? support .allocateSunECProvider () : null ;
512+ break ;
513+ }
511514 case "Apple" , "apple.security.AppleProvider" : {
512515 // need to use reflection since this class only exists on MacOsx
513516 try {
@@ -525,20 +528,6 @@ Provider getProvider() {
525528 }
526529 break ;
527530 }
528- case "SunEC" : {
529- if (JavaVersionUtil .JAVA_SPEC > 21 ) {
530- // Constructor inside method and then allocate. ModuleSupport to open.
531- p = support .isSecurityProviderExpected ("SunEC" , "sun.security.ec.SunEC" ) ? support .allocateSunECProvider () : null ;
532- break ;
533- }
534- /*
535- * On older JDK versions, SunEC was part of the `jdk.crypto.ec` module and was
536- * allocated via the service loading mechanism, so this fallthrough is
537- * intentional. On newer JDK versions, SunEC is part of `java.base` and is
538- * allocated directly.
539- */
540- }
541- // fall through
542531 default : {
543532 if (isLoading ) {
544533 // because this method is synchronized, this can only
0 commit comments