Skip to content

Update commons-lang3 version to 3.20.0 - #1

Closed
vharseko wants to merge 1 commit into
masterfrom
vharseko-patch-3
Closed

vharseko wants to merge 1 commit into
masterfrom
vharseko-patch-3

Conversation

@vharseko

Copy link
Copy Markdown
Owner

@vharseko vharseko closed this Jun 25, 2026
@vharseko
vharseko deleted the vharseko-patch-3 branch July 8, 2026 16:26
vharseko added a commit that referenced this pull request Jul 16, 2026
…deQL java/implicit-cast-in-compound-assignment) (OpenIdentityPlatform#206)

skip(long n) reduced n with Math.min(n, data.length - position) and then
did `position += n`, where position is an int. That compound assignment
implicitly narrows the long back to int.

There is no actual overflow: Math.min bounds the value to
data.length - position, and position is always in [0, data.length], so the
result fits in an int and position + skipped never exceeds data.length.
Make the narrowing explicit by computing the skipped count as an int
(the (int) cast is lossless for the reasons above), doing the compound
assignment in pure int arithmetic, and widening back to long on return.
Behaviour is unchanged.

Fixes code-scanning alert #1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant