66
66
import com .oracle .svm .util .ReflectionUtil ;
67
67
68
68
import jdk .graal .compiler .core .common .SuppressFBWarnings ;
69
- import jdk .graal .compiler .serviceprovider .JavaVersionUtil ;
70
69
import sun .security .util .Debug ;
71
70
import sun .security .util .SecurityConstants ;
72
71
@@ -471,7 +470,6 @@ final class Target_sun_security_jca_ProviderConfig {
471
470
* reachable via a security service.
472
471
*/
473
472
@ Substitute
474
- @ SuppressWarnings ("fallthrough" )
475
473
@ SuppressFBWarnings (value = "DC_DOUBLECHECK" , justification = "This double-check is implemented correctly and is intentional." )
476
474
Provider getProvider () {
477
475
// volatile variable load
@@ -508,6 +506,11 @@ Provider getProvider() {
508
506
p = support .isSecurityProviderExpected ("SunJSSE" , "sun.security.ssl.SunJSSE" ) ? new sun .security .ssl .SunJSSE () : null ;
509
507
break ;
510
508
}
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
+ }
511
514
case "Apple" , "apple.security.AppleProvider" : {
512
515
// need to use reflection since this class only exists on MacOsx
513
516
try {
@@ -525,20 +528,6 @@ Provider getProvider() {
525
528
}
526
529
break ;
527
530
}
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
542
531
default : {
543
532
if (isLoading ) {
544
533
// because this method is synchronized, this can only
0 commit comments