public Response<T> next() { try { String line = response.source().readUtf8Line(); if (line == null) { throw new RuntimeException("Null response from the server."); } try { return json.deserialize(line, watchType); } catch (JsonParseException ex) { Type statusType = new TypeToken<Response<V1Status>>() {}.getType(); Response<V1Status> status = json.deserialize(line, statusType); return new Response<T>(status.type, status.object); } } catch (IOException e) { throw new RuntimeException("IO Exception during next method.", e); } }
public Response<T> next() { try { String line = response.source().readUtf8Line(); if (line == null) { throw new RuntimeException("Null response from the server."); } try { return json.deserialize(line, watchType); } catch (JsonParseException ex) { Type statusType = new TypeToken<Response<V1Status>>() {}.getType(); Response<V1Status> status = json.deserialize(line, statusType); return new Response<T>(status.type, status.object); } } catch (IOException e) { throw new RuntimeException("IO Exception during next method.", e); } }
V1Status status = client.getJSON().deserialize(body, returnType); if (status == null) { return -1;
V1Status status = client.getJSON().deserialize(body, returnType); if (status == null) { return -1;
return json.deserialize(respBody, returnType); } else if (returnType.equals(String.class)) {
return json.deserialize(respBody, returnType); } else if (returnType.equals(String.class)) {