Skip to content

Commit

Permalink
[smartmeter] Remove org.apache.common (openhab#14436)
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 26841af commit e62739a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import javax.measure.Quantity;
import javax.measure.Unit;

import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.DefaultLocation;
import org.eclipse.jdt.annotation.NonNull;
import org.eclipse.jdt.annotation.NonNullByDefault;
Expand Down Expand Up @@ -101,7 +100,7 @@ public void initialize() {
"Parameter 'port' is mandatory and must be configured");
} else {
byte[] pullSequence = config.initMessage == null ? null
: HexUtils.hexToBytes(StringUtils.deleteWhitespace(config.initMessage));
: HexUtils.hexToBytes(config.initMessage.replaceAll("\\s+", ""));
int baudrate = config.baudrate == null ? Baudrate.AUTO.getBaudrate()
: Baudrate.fromString(config.baudrate).getBaudrate();
this.conformity = config.conformity == null ? Conformity.NONE : Conformity.valueOf(config.conformity);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
*/
package org.openhab.binding.smartmeter.internal.helper;

import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.io.transport.serial.SerialPort;

Expand Down Expand Up @@ -66,7 +65,7 @@ public String toString() {
*/
public static SerialParameter fromString(String params) {
try {
return valueOf("_" + StringUtils.upperCase(params));
return valueOf("_" + params.toUpperCase());
} catch (IllegalArgumentException e) {
return SerialParameter._8N1;
}
Expand Down

0 comments on commit e62739a

Please sign in to comment.