summaryrefslogtreecommitdiff
path: root/libjava/classpath/java/util/regex/Pattern.java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/classpath/java/util/regex/Pattern.java')
-rw-r--r--libjava/classpath/java/util/regex/Pattern.java6
1 files changed, 2 insertions, 4 deletions
diff --git a/libjava/classpath/java/util/regex/Pattern.java b/libjava/classpath/java/util/regex/Pattern.java
index 217ce0862a9..35ec0b89eb6 100644
--- a/libjava/classpath/java/util/regex/Pattern.java
+++ b/libjava/classpath/java/util/regex/Pattern.java
@@ -191,7 +191,7 @@ public final class Pattern implements Serializable
public String[] split (CharSequence input, int limit)
{
Matcher matcher = new Matcher(this, input);
- ArrayList list = new ArrayList();
+ ArrayList<String> list = new ArrayList<String>();
int empties = 0;
int count = 0;
int start = 0;
@@ -251,9 +251,7 @@ public final class Pattern implements Serializable
list.add(t);
}
- String[] output = new String [list.size()];
- list.toArray(output);
- return output;
+ return list.toArray(new String[list.size()]);
}
public String pattern ()