[smartmeter] Remove org.apache.common (#14436)
Signed-off-by: lsiepel <leosiepel@gmail.com>
This commit is contained in:
parent
22ccde016d
commit
43232dae2e
|
@ -25,7 +25,6 @@ import java.util.function.Supplier;
|
|||
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;
|
||||
|
@ -101,7 +100,7 @@ public class SmartMeterHandler extends BaseThingHandler {
|
|||
"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);
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
@ -66,7 +65,7 @@ public enum SerialParameter {
|
|||
*/
|
||||
public static SerialParameter fromString(String params) {
|
||||
try {
|
||||
return valueOf("_" + StringUtils.upperCase(params));
|
||||
return valueOf("_" + params.toUpperCase());
|
||||
} catch (IllegalArgumentException e) {
|
||||
return SerialParameter._8N1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue