Skip to content

Commit

Permalink
[GR-39483] Avoid implicitly setting class initialization reason for c…
Browse files Browse the repository at this point in the history
…lasses/packages.

PullRequest: graal/12097
  • Loading branch information
fniephaus committed Jul 1, 2022
2 parents 667fad6 + 2aea868 commit 5c294cf
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ private void insertRec(InitializationNode node, List<String> classOrPackage, Ini
if (node.kind == null) {
node.kind = kind;
node.strict = strict;
node.reasons.add(reason);
} else if (node.kind == kind) {
if (node.reasons.size() < MAX_NUMBER_OF_REASONS) {
node.reasons.add(reason);
Expand All @@ -110,7 +111,7 @@ private void insertRec(InitializationNode node, List<String> classOrPackage, Ini
tail.remove(0);
String nextQualifier = tail.get(0);
if (!node.children.containsKey(nextQualifier)) {
node.children.put(nextQualifier, new InitializationNode(nextQualifier, node, null, false, reason));
node.children.put(nextQualifier, new InitializationNode(nextQualifier, node, null, false));
assert node.children.containsKey(nextQualifier);
}
insertRec(node.children.get(nextQualifier), tail, kind, reason, strict);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ public void afterRegistration(AfterRegistrationAccess access) {
/* Security services */
rci.initializeAtBuildTime("com.sun.crypto.provider", JDK_CLASS_REASON);
rci.initializeAtBuildTime("com.sun.security.auth", JDK_CLASS_REASON);
rci.initializeAtBuildTime("com.sun.security.jgss", "Core JDK classes are initialized at build time for better performance");
rci.initializeAtBuildTime("com.sun.security.jgss", JDK_CLASS_REASON);
rci.initializeAtBuildTime("com.sun.security.cert.internal.x509", JDK_CLASS_REASON);
rci.initializeAtBuildTime("com.sun.security.ntlm", JDK_CLASS_REASON);
rci.initializeAtBuildTime("com.sun.security.sasl", JDK_CLASS_REASON);
Expand Down

0 comments on commit 5c294cf

Please sign in to comment.