Fix Checkstyle violations

- Mostly missing Javadoc on large methods
- CommandInitializer: split command building method into multiple methods
This commit is contained in:
ljacqu
2017-07-16 23:07:13 +02:00
parent 4ac980111d
commit f88350b06d
16 changed files with 421 additions and 331 deletions
@@ -114,7 +114,7 @@ class DistributedFilesPersistenceHandler implements LimboPersistenceHandler {
}
try {
return gson.fromJson(Files.toString(file, StandardCharsets.UTF_8), LIMBO_MAP_TYPE);
return gson.fromJson(Files.asCharSource(file, StandardCharsets.UTF_8).read(), LIMBO_MAP_TYPE);
} catch (Exception e) {
ConsoleLogger.logException("Failed reading '" + file + "':", e);
}
@@ -46,7 +46,7 @@ class IndividualFilesPersistenceHandler implements LimboPersistenceHandler {
}
try {
String str = Files.toString(file, StandardCharsets.UTF_8);
String str = Files.asCharSource(file, StandardCharsets.UTF_8).read();
return gson.fromJson(str, LimboPlayer.class);
} catch (IOException e) {
ConsoleLogger.logException("Could not read player data on disk for '" + player.getName() + "'", e);