RFR: 8291792: DefaultStyledDocument.setCharacterAttribute accepts negative length [v3]

Prasanta Sadhukhan psadhukhan at openjdk.org
Wed Aug 17 11:00:18 UTC 2022


On Wed, 17 Aug 2022 10:04:12 GMT, Tejesh R <tr at openjdk.org> wrote:

>> src/java.desktop/share/classes/javax/swing/text/DefaultStyledDocument.java line 500:
>> 
>>> 498:      */
>>> 499:     public void setCharacterAttributes(int offset, int length, AttributeSet s, boolean replace) {
>>> 500:         if (length <= 0) {
>> 
>> @param length the length >= 0 javadoc should it not be then > 0 ?
>
> Yeah, its should be > 0 in java doc. Will update it accordingly. Then should I raise a CSR......?

probably yes

-------------

PR: https://git.openjdk.org/jdk/pull/9830



More information about the client-libs-dev mailing list