Rework more commons-lang usages (#10314)

* Reworks many commons-lang usages to use standard Java
* Updates all remaining commons.lang imports to commons.lang3

Related to openhab/openhab-addons#7722

Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
Wouter Born
2021-03-16 12:38:16 +01:00
committed by GitHub
parent 16fba31556
commit f3503430b4
257 changed files with 906 additions and 1125 deletions

View File

@@ -12,7 +12,7 @@
*/
package org.openhab.binding.kaleidescape.internal.communication;
import org.apache.commons.lang.StringEscapeUtils;
import org.apache.commons.lang3.StringEscapeUtils;
import org.eclipse.jdt.annotation.NonNullByDefault;
/**
@@ -48,8 +48,8 @@ public class KaleidescapeFormatter {
// I.e. characters with accent, umlaut, etc., they need to be restored to the correct character
// example: Noel (with umlaut 'o') comes in as N\d246el
input = input.replaceAll("(?i)\\\\d([0-9]{3})", "\\&#$1;"); // first convert to html escaped codes
// then convert with unescapeHtml, not sure how to do this without the Apache libraries :(
return StringEscapeUtils.unescapeHtml(input);
// then convert with unescapeHtml4, not sure how to do this without the Apache libraries :(
return StringEscapeUtils.unescapeHtml4(input);
}
}
return input;