Changeset 36146 in osm for applications/editors/josm/plugins/geochat/src/geochat/JsonQueryUtil.java
- Timestamp:
- 2023-09-20T17:53:20+02:00 (14 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/geochat/src/geochat/JsonQueryUtil.java
r36122 r36146 6 6 import java.io.InputStream; 7 7 import java.net.URI; 8 import java.util.ServiceConfigurationError; 8 9 9 10 import jakarta.json.Json; … … 52 53 if (inp == null) 53 54 throw new IOException("Empty response"); 54 try (JsonReader reader = Json.createReader(inp)) {55 try (JsonReader reader = Json.createReader(inp)) { 55 56 return reader.readObject(); 56 } catch ( JsonException e) {57 } catch (ServiceConfigurationError | JsonException e) { 57 58 throw new IOException("Failed to parse JSON: " + e.getMessage(), e); 58 59 } finally { … … 63 64 // Asynchronous operation 64 65 65 private String query; 66 private JsonQueryCallback callback; 67 68 private JsonQueryUtil() {} 66 private final String query; 67 private final JsonQueryCallback callback; 69 68 70 69 private JsonQueryUtil(String query, JsonQueryCallback callback) {
Note:
See TracChangeset
for help on using the changeset viewer.