Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 6840246
Votes 0
Synopsis Lightweight implementation of String.split for simple use case
Category java:classes_lang
Reported Against
Release Fixed 7(b71)
State 10-Fix Delivered, request for enhancement
Priority: 3-Medium
Related Bugs
Submit Date 12-MAY-2009
Description
String.split(regex, limit) uses regex as the implementation and returns java.util.regex.Pattern.compile(regex).split(this, limit).

A simple use of String.split (e.g. the regex is just one character-delimiter) will need to initialize the regex engine and load many regex classes that is pretty heavy-weight.

Most of the String.split calls from the JRE implementation are the simple case e.g. regex parameter is "=", ":", ",", "\0", "\\|"

We can implement a lightweight version of String.split for these simple regex to avoid loading the regex engine.  Alternatively, if feasible, implement a lightweight version of the regex support so that String.replaceAll, String.replaceFirst, String.replace(CharSequence, CharSequence), and String.matches can take advantage of such optimization.
Posted Date : 2009-05-12 19:44:55.0
Work Around
N/A
Evaluation
yes
Posted Date : 2009-08-13 18:07:19.0
Comments
  
  Include a link with my name & email   


PLEASE NOTE: JDK6 is formerly known as Project Mustang