Explorar o código

Sanity check in parseResponse

Baglio Tabifata %!s(int64=4) %!d(string=hai) anos
pai
achega
876342bf58
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      src/net/hkzlab/dupal/dupalproto/DuPALProto.java

+ 2 - 1
src/net/hkzlab/dupal/dupalproto/DuPALProto.java

@@ -70,8 +70,9 @@ public class DuPALProto {
     }
 
     public static String[] parseResponse(String response) {
-        ArrayList<String> respString = new ArrayList<>();
+        if(response == null) return null;
 
+        ArrayList<String> respString = new ArrayList<>();        
         response = response.trim();
 
         if(response.equals(CMD_RESP_ERROR)) {