andrewgaul commented on this pull request.


> @@ -46,6 +51,27 @@ public GsonWrapper(Gson gson) {
    public <T> T fromJson(String json, Class<T> classOfT) {
       return gson.fromJson(json, classOfT);
    }
+   
+   @SuppressWarnings("unchecked")
+   @Override
+   public <T> T fromJson(InputStream json, Type type) {
+      Reader reader = new InputStreamReader(json);
+      try {
+         return (T) gson.fromJson(reader, type);
+      } finally {
+         closeQuietly(reader);

Should the caller do the resource management instead of the callee?

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/1025#pullrequestreview-5378494

Reply via email to