aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/ServerManager.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-12-07 09:43:43 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-12-07 09:43:43 +1300
commit979314a9cfe4215fcf453759153bea67be4a7dd7 (patch)
tree6d3f31ed60a88a2bcd61cab0c5e147a8812e3a2e /src/org/traccar/ServerManager.java
parenta20e996c0929bcca43e5b5595f7ec320fad3c213 (diff)
downloadtrackermap-server-979314a9cfe4215fcf453759153bea67be4a7dd7.tar.gz
trackermap-server-979314a9cfe4215fcf453759153bea67be4a7dd7.tar.bz2
trackermap-server-979314a9cfe4215fcf453759153bea67be4a7dd7.zip
Use UTF-8 name from standard library
Diffstat (limited to 'src/org/traccar/ServerManager.java')
-rw-r--r--src/org/traccar/ServerManager.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/org/traccar/ServerManager.java b/src/org/traccar/ServerManager.java
index 27e0fda05..08557a5d6 100644
--- a/src/org/traccar/ServerManager.java
+++ b/src/org/traccar/ServerManager.java
@@ -19,6 +19,7 @@ import java.io.File;
import java.net.URI;
import java.net.URL;
import java.net.URLDecoder;
+import java.nio.charset.StandardCharsets;
import java.util.Enumeration;
import java.util.LinkedList;
import java.util.List;
@@ -40,7 +41,7 @@ public class ServerManager {
URL packageUrl = Thread.currentThread().getContextClassLoader().getResource(packagePath);
if (packageUrl.getProtocol().equals("jar")) {
- String jarFileName = URLDecoder.decode(packageUrl.getFile(), "UTF-8");
+ String jarFileName = URLDecoder.decode(packageUrl.getFile(), StandardCharsets.UTF_8.name());
try (JarFile jf = new JarFile(jarFileName.substring(5, jarFileName.indexOf("!")))) {
Enumeration<JarEntry> jarEntries = jf.entries();
while (jarEntries.hasMoreElements()) {