OSDN Git Service

Fix "whatever".split(".") behavior.
authorElliott Hughes <enh@google.com>
Tue, 25 Aug 2009 19:55:27 +0000 (12:55 -0700)
committerElliott Hughes <enh@google.com>
Tue, 25 Aug 2009 22:45:54 +0000 (15:45 -0700)
commit870fd9b66c51b18966fb18ec65705efab9cf0d50
tree127bdd2324dc8ad7abb3f20fab7e50fe1d8fc08b
parent0083d37b0e1c9e542f671cbca2e9db6819ecccba
Fix "whatever".split(".") behavior.

Two special cases in Pattern.split's behavior had been incorrectly combined
into one. Separate the two cases, and add tests. I've run the tests against
Java 1.5 and 1.6 too.

Bug: 1957900
libcore/regex/src/main/java/java/util/regex/Pattern.java
libcore/regex/src/test/java/org/apache/harmony/regex/tests/java/util/regex/SplitTest.java