Skip to content

Commit

Permalink
[elerotransmitterstick] Remove apache.commons (openhab#14405)
Browse files Browse the repository at this point in the history
Signed-off-by: lsiepel <leosiepel@gmail.com>
  • Loading branch information
lsiepel authored and nemerdaud committed Feb 28, 2023
1 parent 1154f02 commit ee772b1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ private static byte getCommandByte(CommandType command) {
return (byte) 0x24;
default:
throw new IllegalArgumentException("Unhandled command type " + command);

}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
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;
Expand Down Expand Up @@ -155,8 +154,13 @@ private void analyzeBuffer() {
}

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) {
Expand Down

0 comments on commit ee772b1

Please sign in to comment.