Merge pull request #210 from Fuzzlemann/master

PR for 3.6.0 (Fuzzlemann) (9)
This commit is contained in:
Rsl1122 2017-08-01 07:50:06 +03:00 committed by GitHub
commit af87754219
5 changed files with 7 additions and 5 deletions

View File

@ -200,6 +200,7 @@ public enum Phrase {
localeRows.add(line);
}
}
for (String localeRow : localeRows) {
try {
String[] split = localeRow.split(" <> ");

View File

@ -84,7 +84,7 @@ public class ActivityPart extends RawData {
private void playerActivityGraphs() {
List<TPS> tpsData = tpsPart.getTpsData();
addValue("playersonlineseries", PlayerActivityGraphCreator.buildSeriesDataString(tpsData));
addValue("%playersgraphcolor%", Settings.HCOLOR_ACT_ONL + "");
addValue("%playersgraphcolor%", Settings.HCOLOR_ACT_ONL.toString());
}
private void activityPiechart() {

View File

@ -35,7 +35,7 @@ public class WorldPart extends RawData {
}
public void addToWorld(String worldName, long playTime) {
Long value = worldTimes.computeIfAbsent(worldName, ifNotFound -> 0L);
Long value = worldTimes.getOrDefault(worldName, 0L);
worldTimes.put(worldName, value + playTime);
}
}

View File

@ -36,7 +36,7 @@ Settings:
Security:
DisplayIPsAndUUIDs: true
Certificate:
KeyStorePath: '\SSLCertificate.keystore'
KeyStorePath: 'SSLCertificate.keystore'
KeyPass: 'default'
StorePass: 'default'
Alias: 'alias'

View File

@ -42,10 +42,11 @@ public class ComparatorTest {
for (int i = 0; i < 20; i++) {
test.add(new Point(r.nextLong(), r.nextLong()));
}
List<Long> longValues = test.stream().map(Point::getX).map(i -> (Long) (long) (double) i).collect(Collectors.toList());
List<Long> longValues = test.stream().map(Point::getX).map(i -> (long) (double) i).collect(Collectors.toList());
longValues.sort(Long::compare);
test.sort(new PointComparator());
List<Long> afterSort = test.stream().map(Point::getX).map(i -> (Long) (long) (double) i).collect(Collectors.toList());
List<Long> afterSort = test.stream().map(Point::getX).map(i -> (long) (double) i).collect(Collectors.toList());
assertEquals(longValues, afterSort);
}