Skip to content
This repository has been archived by the owner on Jul 1, 2022. It is now read-only.

Use SenderFactory classloader for ServiceLoader #523

Merged
merged 3 commits into from
Aug 21, 2018
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ public static Sender resolve() {
*/
public static Sender resolve(Configuration.SenderConfiguration senderConfiguration) {
Sender sender = null;
ServiceLoader<SenderFactory> senderFactoryServiceLoader = ServiceLoader.load(SenderFactory.class);
ServiceLoader<SenderFactory> senderFactoryServiceLoader = ServiceLoader.load(SenderFactory.class,
SenderFactory.class.getClassLoader());
Iterator<SenderFactory> senderFactoryIterator = senderFactoryServiceLoader.iterator();

boolean hasMultipleFactories = false;
Expand Down