Skip to content

Conversation

@petrberan
Copy link
Member

InvalidConfigurationFileException {
this.session = LoadPomTask.loadPomFromFile(pomFile).execute(session);
this.session = LoadPomDependenciesTask.INSTANCE.execute(session);
LoadPomDependenciesTask.INSTANCE.execute(session);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand this change.

}

// add dependencies
this.session = AddAllDeclaredDependenciesTask.INSTANCE.execute(session);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ditto, don't understand reasoning for this

settings = decryptPasswords(settings);
enrichWithLocalRepository(settings);
enrichWithOfflineMode(settings);
decryptPasswords(settings);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm almost sure you're loosing state (if the methods didn't change since this code was written)

@petrberan petrberan force-pushed the SHRINKRES-327 branch 2 times, most recently from 2d54703 to fc5437c Compare March 13, 2024 14:53
@petrberan
Copy link
Member Author

All the execute methods in the PR as well as those modifying settings in MavenSettingsBuilder.java are modifying the same assigned variable instance they are assigning the result to. The modification happens regardless of whether the variable is assigned again or not and all executes and the "settings-modifying" methods could in fact return void.

Perhaps more importantly - syntax wise - the repeated assignment of the variable could indicate that the methods return different instance, which is not the case.

@xstefank
Copy link
Member

@petrberan needs rebase

@petrberan petrberan merged commit 1ed152d into shrinkwrap:master Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants