Skip to content
Merged
Show file tree
Hide file tree
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 @@ -26,7 +26,7 @@ public class WebAuthnCredentialProviderFactory implements CredentialProviderFact

public static final String PROVIDER_ID = "keycloak-webauthn";

private ObjectConverter converter;
private volatile ObjectConverter converter;

@Override
public CredentialProvider create(KeycloakSession session) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class WebAuthnPasswordlessCredentialProviderFactory implements Credential

public static final String PROVIDER_ID = "keycloak-webauthn-passwordless";

private ObjectConverter converter;
private volatile ObjectConverter converter;

@Override
public CredentialProvider create(KeycloakSession session) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
import java.util.Map;
import java.util.Objects;
import java.util.Properties;
import java.util.concurrent.atomic.AtomicBoolean;

/**
* @author <a href="mailto:[email protected]">Stian Thorgersen</a>
Expand All @@ -72,9 +71,7 @@ public class WelcomeResource {

protected static final Logger logger = Logger.getLogger(WelcomeResource.class);

private static final String KEYCLOAK_STATE_CHECKER = "WELCOME_STATE_CHECKER";

private AtomicBoolean shouldBootstrap;
private volatile Boolean shouldBootstrap;

@Context
KeycloakSession session;
Expand Down Expand Up @@ -144,7 +141,7 @@ public Response createUser() {

expireCsrfCookie();

shouldBootstrap.set(false);
shouldBootstrap = false;
ServicesLogger.LOGGER.createdTemporaryAdminUser(username);
return createWelcomePage("User created", null);
}
Expand Down Expand Up @@ -262,11 +259,11 @@ private boolean shouldBootstrap() {
if (shouldBootstrap == null) {
synchronized (this) {
if (shouldBootstrap == null) {
shouldBootstrap = new AtomicBoolean(new ApplianceBootstrap(session).isNoMasterUser());
shouldBootstrap = new ApplianceBootstrap(session).isNoMasterUser();
}
}
}
return shouldBootstrap.get();
return shouldBootstrap;
}

public static boolean isLocal(KeycloakSession session) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

public class DefaultFreeMarkerProviderFactory implements FreeMarkerProviderFactory {

private DefaultFreeMarkerProvider provider;
private volatile DefaultFreeMarkerProvider provider;
private ConcurrentHashMap<String, Template> cache;
private KeycloakSanitizerMethod kcSanitizeMethod;

Expand Down
Loading