[bsblan] Remove org.apache.commons (#14515)

* Replace org.apache.commons with org.unbescape

Signed-off-by: lsiepel <leosiepel@gmail.com>
pull/14573/head
lsiepel 2023-03-10 23:37:45 +01:00 committed by GitHub
parent 8e9bc3124e
commit 039e3aa73a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 2 deletions

View File

@ -14,4 +14,13 @@
<name>openHAB Add-ons :: Bundles :: BSB-LAN Binding</name> <name>openHAB Add-ons :: Bundles :: BSB-LAN Binding</name>
<dependencies>
<dependency>
<groupId>org.unbescape</groupId>
<artifactId>unbescape</artifactId>
<version>1.1.6.RELEASE</version>
<scope>compile</scope>
</dependency>
</dependencies>
</project> </project>

View File

@ -14,7 +14,6 @@ package org.openhab.binding.bsblan.internal.helper;
import static org.openhab.binding.bsblan.internal.BsbLanBindingConstants.*; import static org.openhab.binding.bsblan.internal.BsbLanBindingConstants.*;
import org.apache.commons.lang3.StringEscapeUtils;
import org.eclipse.jdt.annotation.NonNullByDefault; import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable; import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.bsblan.internal.api.dto.BsbLanApiParameterDTO; import org.openhab.binding.bsblan.internal.api.dto.BsbLanApiParameterDTO;
@ -26,6 +25,7 @@ import org.openhab.core.types.Command;
import org.openhab.core.types.State; import org.openhab.core.types.State;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.unbescape.html.HtmlEscape;
/** /**
* The {@link BsbLanParameterHandler} is responsible for updating the data, which are * The {@link BsbLanParameterHandler} is responsible for updating the data, which are
@ -75,7 +75,7 @@ public class BsbLanParameterConverter {
} }
private static State getStateForUnitChannel(BsbLanApiParameterDTO parameter) { private static State getStateForUnitChannel(BsbLanApiParameterDTO parameter) {
String value = StringEscapeUtils.unescapeHtml4(parameter.unit); String value = HtmlEscape.unescapeHtml(parameter.unit);
return new StringType(value); return new StringType(value);
} }