Skip to content

Commit d2ccf42

Browse files
committed
Applied changes requested by Chen: 'We might need to specify the IOOBE behavior - when an IOOBE is thrown, some characters may be already transferred (this is important for concurrent char sequences)'
1 parent a5d26c5 commit d2ccf42

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/java.base/share/classes/java/lang/CharSequence.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,10 @@ public static int compare(CharSequence cs1, CharSequence cs2) {
332332
*
333333
* @implSpec
334334
* The default implementation invokes {@link #charAt(int index)} in a loop
335-
* iterating {@code index} from {@code srcBegin} to {@code srcEnd-1}
335+
* iterating {@code index} from {@code srcBegin} to {@code srcEnd-1}.
336+
* Concurrent truncation of this character sequence can throw
337+
* {@code IndexOutOfBoundsException}. In this case, some characters, but not
338+
* all, may be already transferred.
336339
*
337340
* @since 25
338341
*/

0 commit comments

Comments
 (0)