diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2020-08-16 23:18:19 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2020-08-16 23:18:19 +0000 |
commit | b57da2dadafa52b0e1f93845d01e572f118c23d2 (patch) | |
tree | 4cc478eb183628ec6870d6c04dff0a5738df3ad9 /src/java/org/apache/poi/sl/usermodel | |
parent | d6a97ce38d1fe4f266949110b76b38741149f2c3 (diff) | |
download | poi-b57da2dadafa52b0e1f93845d01e572f118c23d2.tar.gz poi-b57da2dadafa52b0e1f93845d01e572f118c23d2.zip |
#64036 - Replace reflection calls in factories for Java 9+
ImageRenderer implementation are now loaded via ServiceLoader
fixed the ServiceLoader.load invocations to pass a sensible ClassLoader as OSGi preparation
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1880909 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/sl/usermodel')
-rw-r--r-- | src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java b/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java index 200120b211..8155fccb8d 100644 --- a/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java +++ b/src/java/org/apache/poi/sl/usermodel/SlideShowFactory.java @@ -48,7 +48,8 @@ public final class SlideShowFactory { private final List<SlideShowProvider<?,?>> provider = new ArrayList<>(); private SlideShowFactory() { - ServiceLoader.load(SlideShowProvider.class).forEach(provider::add); + ClassLoader cl = SlideShowFactory.class.getClassLoader(); + ServiceLoader.load(SlideShowProvider.class, cl).forEach(provider::add); } /** |