Remove apache.commons (#16919)

Signed-off-by: Leo Siepel <leosiepel@gmail.com>
Signed-off-by: Ciprian Pascu <contact@ciprianpascu.ro>
This commit is contained in:
lsiepel 2024-06-23 14:27:23 +02:00 committed by Ciprian Pascu
parent 097b64ec16
commit 1cc3a0aa27
2 changed files with 2 additions and 4 deletions

View File

@ -16,7 +16,6 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Optional; import java.util.Optional;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
/** /**
@ -46,7 +45,7 @@ public class SensiboModel {
} }
public Optional<SensiboSky> findSensiboSkyByMacAddress(final String macAddress) { public Optional<SensiboSky> findSensiboSkyByMacAddress(final String macAddress) {
final String macAddressWithoutColons = StringUtils.remove(macAddress, ':'); final String macAddressWithoutColons = macAddress.replace(":", "");
return pods.stream().filter(pod -> macAddressWithoutColons.equals(pod.getMacAddress())).findFirst(); return pods.stream().filter(pod -> macAddressWithoutColons.equals(pod.getMacAddress())).findFirst();
} }

View File

@ -22,7 +22,6 @@ import java.util.Optional;
import javax.measure.Unit; import javax.measure.Unit;
import javax.measure.quantity.Temperature; import javax.measure.quantity.Temperature;
import org.apache.commons.lang3.StringUtils;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.sensibo.internal.SensiboTemperatureUnitConverter; import org.openhab.binding.sensibo.internal.SensiboTemperatureUnitConverter;
import org.openhab.binding.sensibo.internal.dto.poddetails.ModeCapabilityDTO; import org.openhab.binding.sensibo.internal.dto.poddetails.ModeCapabilityDTO;
@ -55,7 +54,7 @@ public class SensiboSky extends Pod {
public SensiboSky(final PodDetailsDTO dto) { public SensiboSky(final PodDetailsDTO dto) {
super(dto.id); super(dto.id);
this.macAddress = StringUtils.remove(dto.macAddress, ':'); this.macAddress = dto.macAddress.replace(":", "");
this.firmwareVersion = dto.firmwareVersion; this.firmwareVersion = dto.firmwareVersion;
this.firmwareType = dto.firmwareType; this.firmwareType = dto.firmwareType;
this.serialNumber = dto.serialNumber; this.serialNumber = dto.serialNumber;