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:
@@ -100,7 +100,6 @@ public class OpenWeatherMapConnection {
|
||||
private static final ByteArrayFileCache IMAGE_CACHE = new ByteArrayFileCache("org.openhab.binding.openweathermap");
|
||||
private final ExpiringCacheMap<String, String> cache;
|
||||
|
||||
private final JsonParser parser = new JsonParser();
|
||||
private final Gson gson = new Gson();
|
||||
|
||||
public OpenWeatherMapConnection(OpenWeatherMapAPIHandler handler, HttpClient httpClient) {
|
||||
@@ -408,7 +407,7 @@ public class OpenWeatherMapConnection {
|
||||
}
|
||||
|
||||
private String getErrorMessage(String response) {
|
||||
JsonElement jsonResponse = parser.parse(response);
|
||||
JsonElement jsonResponse = JsonParser.parseString(response);
|
||||
if (jsonResponse.isJsonObject()) {
|
||||
JsonObject json = jsonResponse.getAsJsonObject();
|
||||
if (json.has(PROPERTY_MESSAGE)) {
|
||||
|
||||
Reference in New Issue
Block a user