Explorar el Código

Sanity check in parseResponse

Baglio Tabifata hace 4 años
padre
commit
876342bf58
Se han modificado 1 ficheros con 2 adiciones y 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)) {