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:
@@ -844,7 +844,7 @@ public class HueBridge {
|
||||
return super.doNetwork(address, requestMethod, body);
|
||||
} else {
|
||||
String extractedAddress = Util.quickMatch("^http://[^/]+(.+)$", address);
|
||||
JsonElement commandBody = new JsonParser().parse(body);
|
||||
JsonElement commandBody = body == null ? null : JsonParser.parseString(body);
|
||||
scheduleCommand = new ScheduleCommand(extractedAddress, requestMethod, commandBody);
|
||||
|
||||
// Return a fake result that will cause an exception and the callback to end
|
||||
|
||||
@@ -425,9 +425,8 @@ public class HueLightHandlerTest {
|
||||
}
|
||||
|
||||
private void assertJson(String expected, String actual) {
|
||||
JsonParser parser = new JsonParser();
|
||||
JsonElement jsonExpected = parser.parse(expected);
|
||||
JsonElement jsonActual = parser.parse(actual);
|
||||
JsonElement jsonExpected = JsonParser.parseString(expected);
|
||||
JsonElement jsonActual = JsonParser.parseString(actual);
|
||||
assertEquals(jsonExpected, jsonActual);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user