]> git.basschouten.com Git - openhab-addons.git/commitdiff
[sonyprojector] Fix edge case in mac address decoding (#16976)
authorAndrew Fiddian-Green <software@whitebear.ch>
Mon, 1 Jul 2024 15:22:37 +0000 (16:22 +0100)
committerGitHub <noreply@github.com>
Mon, 1 Jul 2024 15:22:37 +0000 (17:22 +0200)
* [sonyprojector] mac fix edge case
* [sonyprojector] delete redundant toLowerCase() call

Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
bundles/org.openhab.binding.sonyprojector/src/main/java/org/openhab/binding/sonyprojector/internal/communication/sdcp/SonyProjectorSdcpConnector.java

index bc0678df8e7a0b13aeb07cf190361b7ce1be19cf..249b502e961771153a0a402c74be157be39b50dd 100644 (file)
@@ -326,8 +326,8 @@ public class SonyProjectorSdcpConnector extends SonyProjectorConnector {
             if (!macAddress.isEmpty()) {
                 macAddress = macAddress + "-";
             }
-            macAddress = macAddress + Integer.toHexString(macByte);
+            macAddress = macAddress + String.format("%02x", macByte);
         }
-        return macAddress.toLowerCase();
+        return macAddress;
     }
 }