소스 검색

If for some reason there are no tokens from tokeniseLine (I can't reproduce) then add an empty one.

Fixes issue 3069.

Change-Id: I832f3caa972ff491a61dfd2f7eca2e715fde8903
Reviewed-on: http://gerrit.dmdirc.com/89
Reviewed-by: Chris Smith <chris@dmdirc.com>
Tested-by: Chris Smith <chris@dmdirc.com>
tags/0.6.3
Shane Mc Cormack 14 년 전
부모
커밋
33e3d88f88
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2
    1
      src/com/dmdirc/parser/irc/IRCParser.java

+ 2
- 1
src/com/dmdirc/parser/irc/IRCParser.java 파일 보기

@@ -875,7 +875,7 @@ public class IRCParser implements SecureParser, Runnable {
875 875
      */
876 876
     public static String[] tokeniseLine(final String line) {
877 877
         if (line == null) {
878
-            return new String[]{"", }; // Return empty string[]
878
+            return new String[]{""}; // Return empty string[]
879 879
         }
880 880
 
881 881
         final int lastarg = line.indexOf(" :");
@@ -890,6 +890,7 @@ public class IRCParser implements SecureParser, Runnable {
890 890
             tokens = line.split(" ");
891 891
         }
892 892
 
893
+        if (tokens.length < 1) { tokens = new String[]{""}; }
893 894
         return tokens;
894 895
     }
895 896
 

Loading…
취소
저장