summaryrefslogtreecommitdiff
path: root/src/main/java/ftbsc/lll/mapper/MapperProvider.java
diff options
context:
space:
mode:
author zaaarf <me@zaaarf.foo>2024-05-31 18:56:00 +0200
committer zaaarf <me@zaaarf.foo>2024-05-31 18:56:00 +0200
commitf7123206100c7026bab4478ad276bcda63f1be6a (patch)
tree52120e0f9dae87cda80ff029b6c70c5dbcf7de46 /src/main/java/ftbsc/lll/mapper/MapperProvider.java
parentc48450085ba07655abc8b119629634f5ca43ebb9 (diff)
fix: solved various (glaring) mistakes, now it works!HEAD0.4.1dev
Diffstat (limited to 'src/main/java/ftbsc/lll/mapper/MapperProvider.java')
-rw-r--r--src/main/java/ftbsc/lll/mapper/MapperProvider.java8
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());
}
}