mirror of
https://github.com/openhab/openhab-addons.git
synced 2025-01-10 15:11:59 +01:00
[network] Fix NumberFormatException for ping when locale has comma as decimal separator (#16636)
* fixing bug: LatencyParser fails to parse ping times on systems with comma (,) set as decimal separator Signed-off-by: Stephan Richter <s.richter@srsoftware.de> Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
parent
92548c5a9f
commit
c6aad8f2c0
@ -55,7 +55,7 @@ public class LatencyParser {
|
|||||||
|
|
||||||
Matcher m = LATENCY_PATTERN.matcher(inputLine);
|
Matcher m = LATENCY_PATTERN.matcher(inputLine);
|
||||||
if (m.find() && m.groupCount() == 1) {
|
if (m.find() && m.groupCount() == 1) {
|
||||||
return millisToDuration(Double.parseDouble(m.group(1)));
|
return millisToDuration(Double.parseDouble(m.group(1).replace(",", ".")));
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("Did not find a latency value");
|
logger.debug("Did not find a latency value");
|
||||||
|
Loading…
Reference in New Issue
Block a user