Java 17 features (N-S) (#15565)
- add missing @override - Java style array syntax - remove redundant modifiers - always move String constants to left side in comparisons - simplify lambda expressions and return statements - use replace instead of replaceAll w/o regex - instanceof matching and multiline strings Signed-off-by: Holger Friedrich <mail@holger-friedrich.de>
This commit is contained in:
@@ -109,7 +109,7 @@ public class TouchWandRestClient {
|
||||
String command = buildUrl(CMD_LOGIN) + "user=" + encodedUser + "&" + "psw=" + encodedPass;
|
||||
response = sendCommand(command, METHOD_GET, "");
|
||||
|
||||
return !response.equals("Unauthorized");
|
||||
return !"Unauthorized".equals(response);
|
||||
}
|
||||
|
||||
public String cmdListUnits() {
|
||||
|
||||
@@ -40,7 +40,6 @@ public class AlarmSensorUnitDataDeserializer implements JsonDeserializer<TouchWa
|
||||
@Override
|
||||
public TouchWandUnitDataAlarmSensor deserialize(JsonElement json, Type typeOfT, JsonDeserializationContext context)
|
||||
throws JsonParseException {
|
||||
|
||||
TouchWandUnitDataAlarmSensor touchWandUnitDataAlarmSensor = new TouchWandUnitDataAlarmSensor();
|
||||
|
||||
JsonObject jsonObject = json.getAsJsonObject();
|
||||
@@ -65,7 +64,6 @@ public class AlarmSensorUnitDataDeserializer implements JsonDeserializer<TouchWa
|
||||
JsonObject.class);
|
||||
|
||||
if (currentStatusObj != null) {
|
||||
|
||||
TouchWandAlarmSensorCurrentStatus touchWandUnitDataAlarmSensorCurrentStatus = touchWandUnitDataAlarmSensor
|
||||
.getCurrStatus();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user