diff --git a/src/main/java/dev/morling/onebrc/WeatherStationFactory.java b/src/main/java/dev/morling/onebrc/WeatherStationFactory.java index 0252fe273..ff6c6a10c 100644 --- a/src/main/java/dev/morling/onebrc/WeatherStationFactory.java +++ b/src/main/java/dev/morling/onebrc/WeatherStationFactory.java @@ -141,7 +141,7 @@ private static char readNonSpace(StringReader nameSource) throws Exception { throw new Exception("Name source exhausted"); } c = (char) n; - } while (c == ' '); + } while (Character.isWhitespace(c)); return c; }