Fix/suppress PMD CompareObjectsWithEquals findings (#11476)
Newer PMD versions discover more CompareObjectsWithEquals findings. Related to https://github.com/openhab/static-code-analysis/pull/423 Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -80,9 +80,9 @@ public final class WWNDataUtil {
|
||||
|
||||
public static String fromFile(String fileName, Unit<Temperature> temperatureUnit) throws IOException {
|
||||
String json = fromFile(fileName);
|
||||
if (temperatureUnit == SIUnits.CELSIUS) {
|
||||
if (SIUnits.CELSIUS.equals(temperatureUnit)) {
|
||||
json = json.replace("\"temperature_scale\": \"F\"", "\"temperature_scale\": \"C\"");
|
||||
} else if (temperatureUnit == ImperialUnits.FAHRENHEIT) {
|
||||
} else if (ImperialUnits.FAHRENHEIT.equals(temperatureUnit)) {
|
||||
json = json.replace("\"temperature_scale\": \"C\"", "\"temperature_scale\": \"F\"");
|
||||
}
|
||||
return json;
|
||||
|
||||
Reference in New Issue
Block a user