Skip to content

Commit

Permalink
[CMTOOL-370] skip migration to elytron tasks if there are no legacy s…
Browse files Browse the repository at this point in the history
…ecurity resources
  • Loading branch information
emmartins committed May 16, 2024
1 parent 596171b commit e6cde32
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ protected MigrateToElytron(final LegacySecurityConfigurations legacySecurityConf
final ManageableResourceTaskRunnableBuilder<S, SubsystemResource> 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);
Expand Down

0 comments on commit e6cde32

Please sign in to comment.