Skip to content

Commit 3a5bee0

Browse files
authored
fix compiler warning (openhab#17085)
Signed-off-by: Michael Lobstein <[email protected]>
1 parent b123863 commit 3a5bee0

File tree

1 file changed

+3
-7
lines changed
  • bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/communication

1 file changed

+3
-7
lines changed

bundles/org.openhab.binding.monopriceaudio/src/main/java/org/openhab/binding/monopriceaudio/internal/communication/AmplifierModel.java

+3-7
Original file line numberDiff line numberDiff line change
@@ -270,20 +270,16 @@ private static MonopriceAudioZoneDTO getMonopriceZoneData(String newZoneData) {
270270

271271
public String getZoneIdFromZoneName(String zoneName) {
272272
for (String zoneId : zoneIdMap.keySet()) {
273-
if (zoneIdMap.get(zoneId).equals(zoneName)) {
273+
if (zoneName.equals(zoneIdMap.get(zoneId))) {
274274
return zoneId;
275275
}
276276
}
277277
return "";
278278
}
279279

280280
public String getZoneName(String zoneId) {
281-
String zoneName = zoneIdMap.get(zoneId);
282-
if (zoneName != null) {
283-
return zoneName;
284-
} else {
285-
return "";
286-
}
281+
final String zoneName = zoneIdMap.get(zoneId);
282+
return zoneName != null ? zoneName : "";
287283
}
288284

289285
public String getCmdPrefix() {

0 commit comments

Comments
 (0)