[elerotransmitterstick] Remove apache.commons (#14405)

Signed-off-by: lsiepel <leosiepel@gmail.com>
This commit is contained in:
lsiepel 2023-02-19 22:16:32 +01:00 committed by GitHub
parent 46f9d5eab7
commit 8e4a2b14ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 4 deletions

View File

@ -77,7 +77,6 @@ public class CommandUtil {
return (byte) 0x24;
default:
throw new IllegalArgumentException("Unhandled command type " + command);
}
}
}

View File

@ -17,7 +17,6 @@ import java.util.ArrayList;
import java.util.List;
import java.util.TooManyListenersException;
import org.apache.commons.lang3.ArrayUtils;
import org.openhab.core.io.transport.serial.PortInUseException;
import org.openhab.core.io.transport.serial.SerialPort;
import org.openhab.core.io.transport.serial.SerialPortEvent;
@ -155,8 +154,13 @@ public class SerialConnection {
}
if (logger.isTraceEnabled()) {
logger.trace("buffer contains bytes: {}",
HexUtils.bytesToHex(ArrayUtils.toPrimitive(bytes.toArray(new Byte[bytes.size()]))));
int j = 0;
byte[] primeBytes = new byte[bytes.size()];
for (Byte b : bytes.toArray(new Byte[bytes.size()])) {
primeBytes[j++] = b.byteValue();
}
logger.trace("buffer contains bytes: {}", HexUtils.bytesToHex(primeBytes));
}
if (bytes.size() > 1) {