Fix SWCommandUtils.numberMapper with nan
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
1fe04962a5
Commit
b01c99f02d
@ -261,6 +261,9 @@ public class SWCommandUtils {
|
|||||||
private static <T> Function<String, T> numberMapper(Function<String, T> mapper) {
|
private static <T> Function<String, T> numberMapper(Function<String, T> mapper) {
|
||||||
return s -> {
|
return s -> {
|
||||||
try {
|
try {
|
||||||
|
if (s.equalsIgnoreCase("nan")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
return mapper.apply(s);
|
return mapper.apply(s);
|
||||||
} catch (NumberFormatException e) {
|
} catch (NumberFormatException e) {
|
||||||
return null;
|
return null;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren