Resolve itest runbundles for Gson and Commons Lang upgrades and fix JsonParser deprecations (#10345)
* Resolve itest runbundles for Gson and Commons Lang upgrades * Fix JsonParser deprecations too * Fix feature verification Signed-off-by: Wouter Born <github@maindrain.net>
This commit is contained in:
@@ -40,7 +40,6 @@ import com.google.gson.JsonParser;
|
||||
public class KM200Device {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(KM200Device.class);
|
||||
private final JsonParser jsonParser = new JsonParser();
|
||||
private final KM200Cryption comCryption;
|
||||
private final KM200Comm<KM200Device> deviceCommunicator;
|
||||
|
||||
@@ -360,7 +359,7 @@ public class KM200Device {
|
||||
logger.debug("{}: SERVICE NOT AVAILABLE", service);
|
||||
return null;
|
||||
} else {
|
||||
nodeRoot = (JsonObject) jsonParser.parse(decodedData);
|
||||
nodeRoot = (JsonObject) JsonParser.parseString(decodedData);
|
||||
}
|
||||
} else {
|
||||
logger.debug("Get empty reply");
|
||||
|
||||
@@ -48,7 +48,6 @@ import com.google.gson.JsonParser;
|
||||
@NonNullByDefault
|
||||
public class KM200DataHandler {
|
||||
private final Logger logger = LoggerFactory.getLogger(KM200DataHandler.class);
|
||||
private final JsonParser jsonParser = new JsonParser();
|
||||
|
||||
private final KM200Device remoteDevice;
|
||||
|
||||
@@ -539,7 +538,7 @@ public class KM200DataHandler {
|
||||
/* The JSONArray of switch items can be send directly */
|
||||
try {
|
||||
/* Check whether this input string is a valid JSONArray */
|
||||
JsonArray userArray = (JsonArray) jsonParser.parse(val);
|
||||
JsonArray userArray = (JsonArray) JsonParser.parseString(val);
|
||||
newObject = userArray.getAsJsonObject();
|
||||
} catch (JsonParseException e) {
|
||||
logger.warn("The input for the switchProgram is not a valid JSONArray : {}",
|
||||
|
||||
Reference in New Issue
Block a user