Skip to content

Commit

Permalink
try api jar loader when loading a provider from the system property
Browse files Browse the repository at this point in the history
Signed-off-by: Lukas Jungmann <lukas.jungmann@oracle.com>
  • Loading branch information
lukasj committed Dec 12, 2022
1 parent 0c7bfeb commit 64b41f6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions api/src/main/java/jakarta/activation/FactoryFinder.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ static <T> T find(Class<T> factoryClass,
if (result != null) {
return result;
}
// try api loader
result = newInstance(className, defaultClassName, FactoryFinder.class.getClassLoader());
if (result != null) {
return result;
}
}

// standard services: java.util.ServiceLoader
Expand Down

0 comments on commit 64b41f6

Please sign in to comment.