diff --git a/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityDomainsToElytron.java b/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityDomainsToElytron.java index 4b0c4e9fe..9a0d8dafc 100644 --- a/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityDomainsToElytron.java +++ b/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityDomainsToElytron.java @@ -73,7 +73,7 @@ protected UpdateSubsystems(final LegacySecurityConfigurations legacySecurityConf ServerMigrationTaskResult taskResult = ServerMigrationTaskResult.SKIPPED; final SubsystemResource subsystemResource = params.getResource(); final LegacySecurityConfiguration legacySecurityConfiguration = legacySecurityConfigurations.getSecurityConfigurations().get(subsystemResource.getServerConfiguration().getConfigurationPath().getPath().toString()); - if (legacySecurityConfiguration != null) { + if (legacySecurityConfiguration != null && legacySecurityConfiguration.requiresMigration()) { if (migrateSubsystemEJB3(legacySecurityConfiguration, subsystemResource, context)) { taskResult = ServerMigrationTaskResult.SUCCESS; } diff --git a/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityRealmsToElytron.java b/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityRealmsToElytron.java index fe45f34f2..6d32e744c 100644 --- a/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityRealmsToElytron.java +++ b/servers/wildfly26.0/src/main/java/org/jboss/migration/wfly/task/security/MigrateLegacySecurityRealmsToElytron.java @@ -92,7 +92,7 @@ protected MigrateToElytron(final LegacySecurityConfigurations legacySecurityConf final ManageableResourceTaskRunnableBuilder runnableBuilder = params -> context -> { final SubsystemResource subsystemResource = params.getResource(); final LegacySecurityConfiguration legacySecurityConfiguration = legacySecurityConfigurations.getSecurityConfigurations().get(subsystemResource.getServerConfiguration().getConfigurationPath().getPath().toString()); - if (legacySecurityConfiguration == null) { + if (legacySecurityConfiguration == null || !legacySecurityConfiguration.requiresMigration()) { return ServerMigrationTaskResult.SKIPPED; } migrateSecurityRealms(legacySecurityConfiguration, subsystemResource, context);