code: public static String[] split(String text, Pattern pattern) {
          if (text.length() == 0) {
              return EMPTY_STRING_ARRAY;
          } else {
              return pattern.split(text, -1);
          }
      }
docs: Splits a string on a pattern. String.split() returns [''] when the string to be
  split is empty. This returns []. This does not remove any empty strings from the result.
  @param text the string to split
  @param pattern the regular expression to match
  @return an array of strings. The array will be empty if text is empty
  
  @throws NullPointerException if expression or text is null