gatk icon indicating copy to clipboard operation
gatk copied to clipboard

Potential fix for code scanning alert no. 15: Implicit narrowing conversion in compound assignment

Open lbergelson opened this issue 6 months ago • 1 comments

Potential fix for https://github.com/broadinstitute/gatk/security/code-scanning/15

To fix the problem, we need to change the type of the total variable from int to long. This will ensure that the sum of the long values in the array is correctly stored without any implicit narrowing conversion. The change should be made in the sum(final long[] x) method in the MathUtils class.

Suggested fixes powered by Copilot Autofix. Review carefully before merging.

lbergelson avatar Apr 13 '25 16:04 lbergelson