JDK-7175206 : (str) StringJoiner subsequence on suffix always returns whole suffix instead of requested part
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.util
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2012-06-07
  • Updated: 2013-04-22
  • Resolved: 2013-04-22
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 8
8Resolved
Related Reports
Blocks :  
Relates :  
Description
If a StringJoiner has been constructed and the user requests a subSequence that is entirely within the bounds of the suffix, then the entire suffix is returned instead of the requested subSequence.

Example:
StringJoiner sj = new StringJoiner("-","Begin<", ">End"); sj.add("Foo"); 
then sj.subSequence( 10, 13 ) returns ">End" instead of "End"

Comments
This fix is incorporated in the addition of StringJoiner.java as part of JDK-7172553
22-04-2013

EVALUATION Available in lambda repo Changeset: 6b79792c3eb3 Author: briangoetz Date: 2012-06-11 17:02 -0400 URL: http://hg.openjdk.java.net/lambda/lambda/jdk/rev/6b79792c3eb3 7175206: StringJoiner subsequence on suffix always returns complete suffix instead of requested subsequence Summary: Code fix to use correct start index on subsequence with new test. Also fixed line endings. Reviewed-by: briangoetz Contributed-by: Jim Gish <###@###.###> ! src/share/classes/java/util/StringJoiner.java ! test-ng/tests/org/openjdk/tests/java/util/StringJoinerTest.java
12-06-2012