JDK-4644224 : BreakIterator should allow use for programming languages
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.text
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2002-02-27
  • Updated: 2005-04-25
  • Resolved: 2005-04-25
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b34Fixed
Related Reports
Relates :  
Description
Name: nl37777			Date: 02/27/2002

The class description for java.text.BreakIterator says:
"BreakIterator is intended for use with natural languages only. Do not
use this class to tokenize a programming language."

This seems like an unnecessary limitation. It would be correct to say
that the various get*Instance methods of the class can only return break
iterators for natural languages because they take a Locale argument, and
locales can only specify natural languages. However, there seems to be
no reason why the BreakIterator interface couldn't also be implemented
to provide breaking information for a programming language. Such a break
iterator would be very useful, for example, in the implementation of a
program editor based on the Swing text components.

The class description should be changed to remove this limitation.
======================================================================
###@###.### 11/2/04 18:34 GMT

Comments
EVALUATION Documentation was rephrased for Mustang. ###@###.### 2005-04-18 21:34:45 GMT
18-04-2005