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

@@ -18,7 +18,6 @@ import java.util.Collections;
import java.util.Dictionary;
import java.util.Set;
import org.apache.commons.lang.StringUtils;
import org.apache.ftpserver.DataConnectionConfigurationFactory;
import org.apache.ftpserver.FtpServerConfigurationException;
import org.apache.ftpserver.ftplet.FtpException;
@@ -98,7 +97,7 @@ public class FtpUploadHandlerFactory extends BaseThingHandlerFactory {
if (properties.get("port") != null) {
String strPort = properties.get("port").toString();
if (StringUtils.isNotEmpty(strPort)) {
if (!strPort.isEmpty()) {
try {
port = Integer.valueOf(strPort);
} catch (NumberFormatException e) {
@@ -109,7 +108,7 @@ public class FtpUploadHandlerFactory extends BaseThingHandlerFactory {
if (properties.get("idleTimeout") != null) {
String strIdleTimeout = properties.get("idleTimeout").toString();
if (StringUtils.isNotEmpty(strIdleTimeout)) {
if (!strIdleTimeout.isEmpty()) {
try {
idleTimeout = Integer.valueOf(strIdleTimeout);
} catch (NumberFormatException e) {