diff --git a/src/main/java/de/adorsys/keycloak/config/model/AuthenticationFlowImport.java b/src/main/java/de/adorsys/keycloak/config/model/AuthenticationFlowImport.java index 65374b163..01c046ced 100644 --- a/src/main/java/de/adorsys/keycloak/config/model/AuthenticationFlowImport.java +++ b/src/main/java/de/adorsys/keycloak/config/model/AuthenticationFlowImport.java @@ -20,6 +20,7 @@ package de.adorsys.keycloak.config.model; +import org.apache.commons.lang3.ObjectUtils; import org.keycloak.representations.idm.AuthenticationExecutionExportRepresentation; import org.keycloak.representations.idm.AuthenticationFlowRepresentation; import org.springframework.stereotype.Component; @@ -55,7 +56,7 @@ public int compare( AuthenticationExecutionExportRepresentation first, AuthenticationExecutionExportRepresentation second ) { - return first.getPriority() - second.getPriority(); + return ObjectUtils.compare(first.getPriority(), second.getPriority()); } } }