Skip to content

Commit 47fbca7

Browse files
committed
Applied changes proposed in response to Joe's CSR comments: 'understood for CharBuffer; I was thinking more of String, StringBuffer, and StringBuilder where there looks to be more textual similarities.'
1 parent cb2a2ef commit 47fbca7

File tree

4 files changed

+2
-63
lines changed

4 files changed

+2
-63
lines changed

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

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -483,34 +483,6 @@ public int offsetByCodePoints(int index, int codePointOffset) {
483483
index, codePointOffset);
484484
}
485485

486-
/**
487-
* Characters are copied from this sequence into the
488-
* destination character array {@code dst}. The first character to
489-
* be copied is at index {@code srcBegin}; the last character to
490-
* be copied is at index {@code srcEnd-1}. The total number of
491-
* characters to be copied is {@code srcEnd-srcBegin}. The
492-
* characters are copied into the subarray of {@code dst} starting
493-
* at index {@code dstBegin} and ending at index:
494-
* <pre>{@code
495-
* dstbegin + (srcEnd-srcBegin) - 1
496-
* }</pre>
497-
*
498-
* @param srcBegin start copying at this offset.
499-
* @param srcEnd stop copying at this offset.
500-
* @param dst the array to copy the data into.
501-
* @param dstBegin offset into {@code dst}.
502-
* @throws IndexOutOfBoundsException if any of the following is true:
503-
* <ul>
504-
* <li>{@code srcBegin} is negative
505-
* <li>{@code dstBegin} is negative
506-
* <li>the {@code srcBegin} argument is greater than
507-
* the {@code srcEnd} argument.
508-
* <li>{@code srcEnd} is greater than
509-
* {@code this.length()}.
510-
* <li>{@code dstBegin+srcEnd-srcBegin} is greater than
511-
* {@code dst.length}
512-
* </ul>
513-
*/
514486
@Override
515487
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin)
516488
{

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

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1735,36 +1735,6 @@ public int offsetByCodePoints(int index, int codePointOffset) {
17351735
return Character.offsetByCodePoints(this, index, codePointOffset);
17361736
}
17371737

1738-
/**
1739-
* Copies characters from this string into the destination character
1740-
* array.
1741-
* <p>
1742-
* The first character to be copied is at index {@code srcBegin};
1743-
* the last character to be copied is at index {@code srcEnd-1}
1744-
* (thus the total number of characters to be copied is
1745-
* {@code srcEnd-srcBegin}). The characters are copied into the
1746-
* subarray of {@code dst} starting at index {@code dstBegin}
1747-
* and ending at index:
1748-
* <blockquote><pre>
1749-
* dstBegin + (srcEnd-srcBegin) - 1
1750-
* </pre></blockquote>
1751-
*
1752-
* @param srcBegin index of the first character in the string
1753-
* to copy.
1754-
* @param srcEnd index after the last character in the string
1755-
* to copy.
1756-
* @param dst the destination array.
1757-
* @param dstBegin the start offset in the destination array.
1758-
* @throws IndexOutOfBoundsException If any of the following
1759-
* is true:
1760-
* <ul><li>{@code srcBegin} is negative.
1761-
* <li>{@code srcBegin} is greater than {@code srcEnd}
1762-
* <li>{@code srcEnd} is greater than the length of this
1763-
* string
1764-
* <li>{@code dstBegin} is negative
1765-
* <li>{@code dstBegin+(srcEnd-srcBegin)} is larger than
1766-
* {@code dst.length}</ul>
1767-
*/
17681738
@Override
17691739
public void getChars(int srcBegin, int srcEnd, char[] dst, int dstBegin) {
17701740
checkBoundsBeginEnd(srcBegin, srcEnd, length());

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 1994, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 1994, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it
@@ -279,9 +279,6 @@ public synchronized int offsetByCodePoints(int index, int codePointOffset) {
279279
return super.offsetByCodePoints(index, codePointOffset);
280280
}
281281

282-
/**
283-
* @throws IndexOutOfBoundsException {@inheritDoc}
284-
*/
285282
@Override
286283
public synchronized void getChars(int srcBegin, int srcEnd, char[] dst,
287284
int dstBegin)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2003, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2003, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* This code is free software; you can redistribute it and/or modify it

0 commit comments

Comments
 (0)