ServerSync

ServerSync

48.5k Downloads

ArrayIndexOutOfBoundsException - When using single part locales

AidasPa opened this issue ยท 3 comments

commented

Serversync Version:

4.1.0

Minecraft Version:

irrelevant

Issue:

Can't boot up the server on a linux machine (ubuntu 18.04)
java -jar serversync.jar -s yields
java.lang.ArrayIndexOutOfBoundsException: Index 1 out of bounds for length 1 at com.superzanti.serversync.config.JsonConfig.forServer(JsonConfig.java:118) at com.superzanti.serversync.config.ConfigLoader.load(ConfigLoader.java:40) at com.superzanti.serversync.ServerSync.runInServerMode(ServerSync.java:111) at com.superzanti.serversync.ServerSync.call(ServerSync.java:72) at com.superzanti.serversync.ServerSync.call(ServerSync.java:26) at picocli.CommandLine.executeUserObject(CommandLine.java:1853) at picocli.CommandLine.access$1100(CommandLine.java:145) at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2255) at picocli.CommandLine$RunLast.handle(CommandLine.java:2249) at picocli.CommandLine$RunLast.handle(CommandLine.java:2213) at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2080) at picocli.CommandLine.execute(CommandLine.java:1978) at com.superzanti.serversync.ServerSync.main(ServerSync.java:62)

commented

After reading the code, editing the locale in the cfg from en to en_US makes the error go away..

commented

Code makes the assumption that the locale will be multipart, will need some handling for single part locales.