Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Classloader flaw in BackendServiceLoader #2217

Closed
laeubi opened this issue Jan 23, 2021 · 0 comments · Fixed by #2220
Closed

Classloader flaw in BackendServiceLoader #2217

laeubi opened this issue Jan 23, 2021 · 0 comments · Fixed by #2220
Labels
🐛 bug Defect / Bug

Comments

@laeubi
Copy link

laeubi commented Jan 23, 2021

Describe the bug

BackendServiceLoader the BackendProviderService is loaded only with the classname but not with the classloader. This can laed in some restricted environments to a failing classload.

    public Collection<? extends Backend> get() {
        return get(ServiceLoader.load(BackendProviderService.class));
    }

Expected behavior

    public Collection<? extends Backend> get() {
        return get(ServiceLoader.load(BackendProviderService.class, classLoaderSupplier.get()));
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Defect / Bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants