[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-2d-dev
Subject:    Integrated: 8291792: DefaultStyledDocument.setCharacterAttributes accepts negative length
From:       Tejesh R <tr () openjdk ! org>
Date:       2022-08-30 8:41:11
Message-ID: TAIIjRliklgc0_s0uZD35AYtNEUKGaf1W7dwxRixMxU=.4ad8b7ad-7060-4803-bed7-232109c29e9d () github ! com
[Download RAW message or body]

On Thu, 11 Aug 2022 05:21:48 GMT, Tejesh R <tr@openjdk.org> wrote:

> The Document for _DefaultStyledDocument.setCharacterAttribute_ states that the \
> range of length accepted is `length - the length >= 0`, whereas in code the length \
> check is done only for `length==0`. Meaning the control just returns if the \
> `length` is 0. Since length is  _int_ type and there is a possibility of negative \
> length being set through the method, the code doesn't actually handles the negative \
> length case. Hence to handle negative length, negative length check has been added \
> along with 0 check. Its safe to check and return the control for `negative` length \
> input. Test case to check the same is added.

This pull request has now been integrated.

Changeset: 4a28f379
Author:    Tejesh R <tr@openjdk.org>
Committer: Prasanta Sadhukhan <psadhukhan@openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/4a28f3798d25b64d44aad557f94d1045c253cdfb
                
Stats:     99 lines in 2 files changed: 97 ins; 0 del; 2 mod

8291792: DefaultStyledDocument.setCharacterAttributes accepts negative length

Reviewed-by: psadhukhan, prr

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

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic