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

Commit

Permalink
Use SenderFactory classloader for ServiceLoader (#523)
Browse files Browse the repository at this point in the history
Use SenderFactory classloader for ServiceLoader
  • Loading branch information
dbuchhorn authored and jpkrohling committed Aug 21, 2018
1 parent 27bd0e0 commit 4934922
Showing 1 changed file with 2 additions and 1 deletion.
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

0 comments on commit 4934922

Please sign in to comment.