diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-18 14:36:31 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-18 14:36:31 -0700 |
commit | e665a2c7f4dd925bed116961da48bb018d6f57f7 (patch) | |
tree | e22e63d11900006234503cbdf0a2016b94a7278f /src/main/java/org/traccar/MainModule.java | |
parent | 367c6266918a9f21ec6a9eabd091b00016c1d1bf (diff) | |
download | trackermap-server-e665a2c7f4dd925bed116961da48bb018d6f57f7.tar.gz trackermap-server-e665a2c7f4dd925bed116961da48bb018d6f57f7.tar.bz2 trackermap-server-e665a2c7f4dd925bed116961da48bb018d6f57f7.zip |
Remove static injector usages
Diffstat (limited to 'src/main/java/org/traccar/MainModule.java')
-rw-r--r-- | src/main/java/org/traccar/MainModule.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main/java/org/traccar/MainModule.java b/src/main/java/org/traccar/MainModule.java index 3120118fc..5a5675859 100644 --- a/src/main/java/org/traccar/MainModule.java +++ b/src/main/java/org/traccar/MainModule.java @@ -111,9 +111,8 @@ public class MainModule extends AbstractModule { } @Provides - public static Client provideClient() { - return ClientBuilder.newClient().register( - (ContextResolver<ObjectMapper>) clazz -> Main.getInjector().getInstance(ObjectMapper.class)); + public static Client provideClient(ObjectMapper objectMapper) { + return ClientBuilder.newClient().register((ContextResolver<ObjectMapper>) clazz -> objectMapper); } @Singleton |