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:
@@ -25,7 +25,6 @@ import javax.xml.xpath.XPath;
|
||||
import javax.xml.xpath.XPathExpressionException;
|
||||
import javax.xml.xpath.XPathFactory;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.eclipse.jetty.client.HttpClient;
|
||||
import org.eclipse.jetty.client.api.ContentResponse;
|
||||
import org.eclipse.jetty.client.api.Request;
|
||||
@@ -288,17 +287,17 @@ public class AutelisHandler extends BaseThingHandler {
|
||||
String username = configuration.user;
|
||||
String password = configuration.password;
|
||||
|
||||
if (StringUtils.isBlank(username)) {
|
||||
if (username == null || username.isBlank()) {
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "username must not be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(password)) {
|
||||
if (password == null || password.isBlank()) {
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "password must not be empty");
|
||||
return;
|
||||
}
|
||||
|
||||
if (StringUtils.isBlank(host)) {
|
||||
if (host == null || host.isBlank()) {
|
||||
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, "hostname must not be empty");
|
||||
return;
|
||||
}
|
||||
@@ -443,7 +442,7 @@ public class AutelisHandler extends BaseThingHandler {
|
||||
}
|
||||
}
|
||||
|
||||
if (StringUtils.isEmpty((value))) {
|
||||
if (value == null || value.isEmpty()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user