On Thu, 23 Feb 2023 16:17:00 GMT, Jim Laskey <jlas...@openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/AbstractStringBuilder.java line 1839: >> >>> 1837: * @throws StringIndexOutOfBoundsException if the result >>> overflows the buffer >>> 1838: */ >>> 1839: public AbstractStringBuilder repeat(char c, int count) { >> >> The shadowing of the count field is a hidden maintenance trap. > > I know but Stuart requested it. But this method is overridden in the subclasses. We may keep it `count` in subclasses for the API but use different name here for the implementation. What do you think? ------------- PR: https://git.openjdk.org/jdk/pull/12728