Browse Source

Sanity check in parseResponse

Baglio Tabifata 4 năm trước cách đây
mục cha
commit
876342bf58
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  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)) {