Skip to content

feat/m2m-manager-locator#102

Draft
lis0x90 wants to merge 2 commits intomainfrom
feat/m2m-manager-locator
Draft

feat/m2m-manager-locator#102
lis0x90 wants to merge 2 commits intomainfrom
feat/m2m-manager-locator

Conversation

@lis0x90
Copy link
Copy Markdown
Member

@lis0x90 lis0x90 commented Feb 2, 2026

Add utility class that helps locate M2MManager implementation in classpath context

@github-actions github-actions bot added the enhancement New feature or request label Feb 2, 2026
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Feb 2, 2026

@lis0x90 lis0x90 requested review from TaurMorchant, alsergs and estetsenko and removed request for alsergs February 2, 2026 07:45
@lis0x90 lis0x90 marked this pull request as draft February 2, 2026 08:31

public class M2MManagerLocator {

public static M2MManager getM2MManager() {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

maybe rename to something like M2MManagerProvider.get()?

.stream()
.map(ServiceLoader.Provider::get)
.max(Comparator.comparingInt(M2MManager::priority))
.orElseThrow(()->new Error("Service loader failed to load M2MManager class: " + loader.getClass().getName()));
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

M2MManager.class.getName()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants