From 052e24989692f9638ba432178b43523281729c1a Mon Sep 17 00:00:00 2001 From: bmalinowsky Date: Sun, 8 Oct 2023 15:37:55 +0200 Subject: [PATCH] Minor formatting --- src/io/calimero/link/KNXNetworkLinkUsb.java | 3 +-- src/io/calimero/link/KNXNetworkMonitorUsb.java | 4 ++-- src/io/calimero/mgmt/ManagementProceduresImpl.java | 4 ++-- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/io/calimero/link/KNXNetworkLinkUsb.java b/src/io/calimero/link/KNXNetworkLinkUsb.java index 4968a00a..5c9e1bca 100644 --- a/src/io/calimero/link/KNXNetworkLinkUsb.java +++ b/src/io/calimero/link/KNXNetworkLinkUsb.java @@ -40,7 +40,6 @@ import static io.calimero.serial.usb.UsbConnection.EmiType.Emi1; import static java.lang.System.Logger.Level.DEBUG; import static java.lang.System.Logger.Level.ERROR; -import static java.lang.System.Logger.Level.INFO; import static java.lang.System.Logger.Level.TRACE; import java.util.EnumSet; @@ -140,7 +139,7 @@ protected KNXNetworkLinkUsb(final UsbConnection c, final KNXMediumSettings setti // report device descriptor before switching to link layer mode // not all devices provide a device descriptor 0 final DD0 dd0 = conn.deviceDescriptor(); - logger.log(INFO, "Device Descriptor (Mask Version) {0}", dd0); + logger.log(DEBUG, "KNX device descriptor 0 (Mask Version): {0}", dd0); } catch (final KNXTimeoutException expected) {} diff --git a/src/io/calimero/link/KNXNetworkMonitorUsb.java b/src/io/calimero/link/KNXNetworkMonitorUsb.java index ecefeb46..bca890c1 100644 --- a/src/io/calimero/link/KNXNetworkMonitorUsb.java +++ b/src/io/calimero/link/KNXNetworkMonitorUsb.java @@ -39,9 +39,9 @@ import static io.calimero.serial.usb.UsbConnection.EmiType.Cemi; import static io.calimero.serial.usb.UsbConnection.EmiType.Emi1; import static io.calimero.serial.usb.UsbConnection.EmiType.Emi2; - import static java.lang.System.Logger.Level.INFO; +import java.lang.System.Logger.Level; import java.util.EnumSet; import io.calimero.Connection.BlockingMode; @@ -126,7 +126,7 @@ protected KNXNetworkMonitorUsb(final UsbConnection c, final KNXMediumSettings se // report device descriptor before switching to busmonitor mode // not all devices provide a device descriptor 0 final DD0 dd0 = conn.deviceDescriptor(); - logger.log(INFO, "Device Descriptor (Mask Version) {0}", dd0); + logger.log(Level.DEBUG, "KNX device descriptor 0 (Mask Version): {0}", dd0); } catch (final KNXTimeoutException expected) {} diff --git a/src/io/calimero/mgmt/ManagementProceduresImpl.java b/src/io/calimero/mgmt/ManagementProceduresImpl.java index e4605eb3..6d19d957 100644 --- a/src/io/calimero/mgmt/ManagementProceduresImpl.java +++ b/src/io/calimero/mgmt/ManagementProceduresImpl.java @@ -146,7 +146,7 @@ public void broadcast(final FrameEvent e) {} @Override public void dataConnected(final FrameEvent e) { final var frame = e.getFrame(); - if (frame instanceof CEMILData data) { + if (frame instanceof final CEMILData data) { final byte[] apdu = frame.getPayload(); final var source = data.getSource(); if (DataUnitBuilder.getAPDUService(apdu) == DEVICE_DESC_RESPONSE) { @@ -155,7 +155,7 @@ public void dataConnected(final FrameEvent e) { dd0.accept(source, dd); } catch (final RuntimeException rte) { // KNXIllegalArgumentException for unknown DD0 - logger.log(INFO, "{0} device descriptor 0 response", source, rte); + logger.log(INFO, source + " device descriptor 0 response", rte); } } }