mirror of
https://github.com/TheAlgorithms/Java.git
synced 2025-07-06 00:54:32 +08:00
style: include SLS_SUSPICIOUS_LOOP_SEARCH
(#6260)
This commit is contained in:
@ -195,9 +195,6 @@
|
||||
<Match>
|
||||
<Bug pattern="DRE_DECLARED_RUNTIME_EXCEPTION" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="SLS_SUSPICIOUS_LOOP_SEARCH" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="BAS_BLOATED_ASSIGNMENT_SCOPE" />
|
||||
</Match>
|
||||
|
@ -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));
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user