JDK-6470511 : StringTokenizer.nextToken(CharSequence) in addition to StringTokenizer.nextToken(String)
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 6
  • Priority: P5
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2006-09-14
  • Updated: 2012-07-09
  • Resolved: 2012-07-09
Related Reports
Relates :  
Description
With the introduction of the CharSequence interface,the String class is no longer the lowest-common-denominatorfor character data, and yet String argumentsare still a pervasive requirement throughout the API.

All API methods currently specifying String argumentsshould be relaxed to CharSequence arguments unlessthey require immutability, equals(), hashCode(),or other String-specific behavior.

This change would not affect any existing code.

Here are a few candidate methodsfound by simply searching the API for the string,err, I mean the CharSequence ;-)
---> "(String"

StringTokenizer.nextToken(String delim)

[ other methods in java.lang, javax.swing, etc removed from this list ]

Comments
EVALUATION We are intentionally not putting much effort into maintaining StringTokenizer, so modernizing it is a low priority.
14-09-2006