Handle HTTP 401 and beautify HTTP messages
[fonbot.git] / src / ro / ieval / fonbot / PollResultCallback.java
index 6be7479a0031a0441886dc35fdd8a0a1d15be156..d3c84cebc1a2dde5eaacbbabba9b7801bfe0a6ed 100644 (file)
@@ -3,6 +3,7 @@ package ro.ieval.fonbot;
 import static ro.ieval.fonbot.Utils.toNonNull;
 
 import java.io.InputStream;
+import org.eclipse.jdt.annotation.Nullable;
 
 import org.json.JSONArray;
 import org.json.JSONObject;
@@ -53,8 +54,8 @@ final class PollResultCallback implements ResultCallback {
        }
 
        @Override
-       public void onResult(final int responseCode, final String responseMessage, final InputStream inputStream) {
-               if(responseCode!=200)
+       public void onResult(final int responseCode, final String responseMessage, final @Nullable InputStream inputStream) {
+               if(responseCode!=200 || inputStream==null)
                        return;
 
                final Handler handler=new Handler(Looper.getMainLooper());
This page took 0.009812 seconds and 4 git commands to generate.