[AB-xxx] fixing exact temperatures not leading to an appropriate color for weather service

This commit is contained in:
Sheldan
2023-06-22 22:49:47 +02:00
parent 46baa79d3e
commit 346e462185

View File

@@ -61,7 +61,7 @@ public class WeatherServiceBean implements WeatherService {
return Color.decode(TEMPERATURE_COLOR_MAP.get(TEMPERATURE_COLOR_MAP
.keySet()
.stream()
.filter(pair -> pair.getLeft() < temperature && pair.getRight() > temperature)
.filter(pair -> pair.getLeft() < temperature && pair.getRight() >= temperature)
.findFirst().orElse(TEMPERATURE_COLOR_MAP.keySet().iterator().next())));
}
}