gatk
gatk copied to clipboard
Potential fix for code scanning alert no. 15: Implicit narrowing conversion in compound assignment
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.