Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -97,13 +97,13 @@ public synchronized Supplier<TransactionalPersistence> getOrCreateSessionSupplie
private void bootstrapRealmsAndPrintCredentials(List<String> realms) {
RootCredentialsSet rootCredentialsSet = RootCredentialsSet.fromEnvironment();
this.bootstrapRealms(realms, rootCredentialsSet);
bootstrappedRealms.addAll(realms);
}

@Override
public Map<String, PrincipalSecretsResult> bootstrapRealms(
Iterable<String> realms, RootCredentialsSet rootCredentialsSet) {
Map<String, PrincipalSecretsResult> results = super.bootstrapRealms(realms, rootCredentialsSet);
bootstrappedRealms.addAll(results.keySet());

Map<String, RootCredentials> presetCredentials = rootCredentialsSet.credentials();
for (String realmId : realms) {
Expand All @@ -113,6 +113,9 @@ public Map<String, PrincipalSecretsResult> bootstrapRealms(
}

PrincipalSecretsResult principalSecrets = results.get(realmId);
if (principalSecrets == null) {
continue; // already bootstrapped (possible benign race)
}

String msg =
String.format(
Expand Down