From 27a774020cc89e1351fa973a36ecf546a6d53bd3 Mon Sep 17 00:00:00 2001 From: Piotr Idzik <65706193+vil02@users.noreply.github.com> Date: Wed, 4 Jun 2025 22:37:38 +0200 Subject: [PATCH] style: include `SLS_SUSPICIOUS_LOOP_SEARCH` (#6260) --- spotbugs-exclude.xml | 3 --- .../com/thealgorithms/ciphers/AffineCipher.java | 13 +------------ 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/spotbugs-exclude.xml b/spotbugs-exclude.xml index 3b77ced1a..bcc053611 100644 --- a/spotbugs-exclude.xml +++ b/spotbugs-exclude.xml @@ -195,9 +195,6 @@ - - - diff --git a/src/main/java/com/thealgorithms/ciphers/AffineCipher.java b/src/main/java/com/thealgorithms/ciphers/AffineCipher.java index b82681372..979f18532 100644 --- a/src/main/java/com/thealgorithms/ciphers/AffineCipher.java +++ b/src/main/java/com/thealgorithms/ciphers/AffineCipher.java @@ -68,6 +68,7 @@ final class AffineCipher { // then i will be the multiplicative inverse of a if (flag == 1) { aInv = i; + break; } } for (int i = 0; i < cipher.length(); i++) { @@ -83,16 +84,4 @@ final class AffineCipher { return msg.toString(); } - - // Driver code - public static void main(String[] args) { - String msg = "AFFINE CIPHER"; - - // Calling encryption function - String cipherText = encryptMessage(msg.toCharArray()); - System.out.println("Encrypted Message is : " + cipherText); - - // Calling Decryption function - System.out.println("Decrypted Message is: " + decryptCipher(cipherText)); - } }