Skip to content

Commit b3b8db9

Browse files
authored
Merge pull request ibmruntimes#383 from jasonkatonica/katonica/issue524/rsmfailingduetobcsignedjars17
Ensure static fields set during signed jar process
2 parents 48be99a + 9df9f14 commit b3b8db9

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/java.base/share/classes/sun/security/jca/Providers.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ public class Providers {
5656
// Note volatile immutable object, so no synchronization needed.
5757
private static volatile ProviderList providerList;
5858

59-
static {
60-
// set providerList to empty list first in case initialization somehow
61-
// triggers a getInstance() call (although that should not happen)
62-
providerList = ProviderList.EMPTY;
63-
providerList = ProviderList.fromSecurityProperties();
64-
RestrictedSecurity.checkHashValues();
65-
}
66-
6759
private Providers() {
6860
// empty
6961
}
@@ -114,6 +106,14 @@ private Providers() {
114106
"com.sun.crypto.provider.SunJCE",
115107
};
116108

109+
static {
110+
// set providerList to empty list first in case initialization somehow
111+
// triggers a getInstance() call (although that should not happen)
112+
providerList = ProviderList.EMPTY;
113+
providerList = ProviderList.fromSecurityProperties();
114+
RestrictedSecurity.checkHashValues();
115+
}
116+
117117
// Return Sun provider.
118118
// This method should only be called by
119119
// sun.security.util.ManifestEntryVerifier and java.security.SecureRandom.

0 commit comments

Comments
 (0)