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:
@@ -50,12 +50,12 @@ import com.google.gson.JsonSyntaxException;
|
||||
/**
|
||||
* The {@link RadioThermostatDiscoveryService} is responsible for discovery of
|
||||
* RadioThermostats on the local network
|
||||
*
|
||||
*
|
||||
* @author William Welliver - Initial contribution
|
||||
* @author Dan Cunningham - Refactoring and Improvements
|
||||
* @author Bill Forsyth - Modified for the RadioThermostat's peculiar discovery mode
|
||||
* @author Michael Lobstein - Cleanup for RadioThermostat
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
@NonNullByDefault
|
||||
@@ -245,7 +245,7 @@ public class RadioThermostatDiscoveryService extends AbstractDiscoveryService {
|
||||
try {
|
||||
// Run the HTTP request and get the JSON response from the thermostat
|
||||
sysinfo = HttpUtil.executeUrl("GET", url, 20000);
|
||||
content = new JsonParser().parse(sysinfo).getAsJsonObject();
|
||||
content = JsonParser.parseString(sysinfo).getAsJsonObject();
|
||||
uuid = content.get("uuid").getAsString();
|
||||
} catch (IOException | JsonSyntaxException e) {
|
||||
logger.debug("Cannot get system info from thermostat {} {}", ip, e.getMessage());
|
||||
@@ -254,7 +254,7 @@ public class RadioThermostatDiscoveryService extends AbstractDiscoveryService {
|
||||
|
||||
try {
|
||||
String nameinfo = HttpUtil.executeUrl("GET", url + "name", 20000);
|
||||
content = new JsonParser().parse(nameinfo).getAsJsonObject();
|
||||
content = JsonParser.parseString(nameinfo).getAsJsonObject();
|
||||
name = content.get("name").getAsString();
|
||||
} catch (IOException | JsonSyntaxException e) {
|
||||
logger.debug("Cannot get name from thermostat {} {}", ip, e.getMessage());
|
||||
|
||||
Reference in New Issue
Block a user