Implicit narrowing conversion in compound assignment

Description

Found by CodeQL:

Compound assignment statements (for example 'intvar += longvar') that implicitly cast a value of a wider type to a narrower type may result in information loss and numeric errors such as overflows.

Ensure that the type of the left-hand side of the compound assignment statement is at least as wide as the type of the right-hand side.

This affects xmppserver/src/main/java/org/jivesoftware/database/ProfiledConnection.java

Environment

None

Activity

Show:
Fixed

Details

Assignee

Reporter

Fix versions

Priority

Created November 18, 2020 at 12:45 PM
Updated November 20, 2020 at 3:19 PM
Resolved November 20, 2020 at 3:19 PM

Flag notifications