diff options
Diffstat (limited to 'src/main/java/ftbsc/lll/mapper/MapperProvider.java')
-rw-r--r-- | src/main/java/ftbsc/lll/mapper/MapperProvider.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/ftbsc/lll/mapper/MapperProvider.java b/src/main/java/ftbsc/lll/mapper/MapperProvider.java index 5ac9178..7dc8ade 100644 --- a/src/main/java/ftbsc/lll/mapper/MapperProvider.java +++ b/src/main/java/ftbsc/lll/mapper/MapperProvider.java @@ -36,7 +36,7 @@ public class MapperProvider { */ private void loadMappers() { this.loadedMappers = new HashSet<>(); - for(IMappingFormat mapper: ServiceLoader.load(IMappingFormat.class)) + for(IMappingFormat mapper: ServiceLoader.load(IMappingFormat.class, this.getClass().getClassLoader())) this.loadedMappers.add(mapper); if(this.loadedMappers.isEmpty()) throw new RuntimeException("Something went wrong: no mapper types were loaded successfully!"); @@ -79,7 +79,9 @@ public class MapperProvider { } } - return new BufferedReader(new InputStreamReader(targetStream, - StandardCharsets.UTF_8)).lines().collect(Collectors.toList()); + return new BufferedReader(new InputStreamReader( + targetStream, + StandardCharsets.UTF_8) + ).lines().collect(Collectors.toList()); } } |