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

@@ -25,7 +25,6 @@ import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.apache.commons.lang.StringUtils;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.harmonyhub.internal.HarmonyHubHandlerFactory;
@@ -263,9 +262,9 @@ public class HarmonyHubHandler extends BaseBridgeHandler implements HarmonyClien
// earlier versions required a name and used network discovery to find the hub and retrieve the host,
// this section is to not break that and also update older configurations to use the host configuration
// option instead of name
if (StringUtils.isBlank(host)) {
if (host == null || host.isBlank()) {
host = getThing().getProperties().get(HUB_PROPERTY_HOST);
if (StringUtils.isNotBlank(host)) {
if (host != null && !host.isBlank()) {
Configuration genericConfig = getConfig();
genericConfig.put(HUB_PROPERTY_HOST, host);
updateConfiguration(genericConfig);