From 02e346b3c6487e51b6ff4364aa7ac1f7f81be8ef Mon Sep 17 00:00:00 2001 From: offsoc <139764790+offsoc@users.noreply.github.com> Date: Sat, 11 Jan 2025 23:58:28 +0800 Subject: [PATCH] Fix code scanning alert no. 9: Implicit narrowing conversion in compound assignment Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com> --- .../whispersystems/textsecuregcm/backup/BackupManagerTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service/src/test/java/org/whispersystems/textsecuregcm/backup/BackupManagerTest.java b/service/src/test/java/org/whispersystems/textsecuregcm/backup/BackupManagerTest.java index f5a510a50..dd0f6403a 100644 --- a/service/src/test/java/org/whispersystems/textsecuregcm/backup/BackupManagerTest.java +++ b/service/src/test/java/org/whispersystems/textsecuregcm/backup/BackupManagerTest.java @@ -383,7 +383,7 @@ public void signatureValidation() throws VerificationFailedException { // an invalid signature final byte[] wrongSignature = Arrays.copyOf(signature, signature.length); - wrongSignature[1] += 1; + wrongSignature[1] = (byte) (wrongSignature[1] + 1); // shouldn't be able to set a public key with an invalid signature assertThatExceptionOfType(StatusRuntimeException.class)