Skip to content

Commit 6ee6b34

Browse files
Merge branch 'master' into feature/thread-safe-queue
2 parents 3293397 + 763b95b commit 6ee6b34

4 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/main/java/com/thealgorithms/ciphers/AESEncryption.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public static void main(String[] args) throws Exception {
3838
System.out.println("Original Text:" + plainText);
3939
System.out.println("AES Key (Hex Form):" + bytesToHex(secKey.getEncoded()));
4040
System.out.println("Encrypted Text (Hex Form):" + bytesToHex(cipherText));
41-
System.out.println("Descrypted Text:" + decryptedText);
41+
System.out.println("Decryption successful. Decrypted text matches original: " + decryptedText.equals(plainText));
4242
}
4343

4444
/**

src/main/java/com/thealgorithms/conversions/AnyBaseToAnyBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* <p>
44
* Time Complexity: O(n) [or appropriate complexity]
55
* Space Complexity: O(n)
6-
* * @author Reshma Kakkirala
6+
* @author Reshma Kakkirala
77
*/
88
package com.thealgorithms.conversions;
99

src/main/java/com/thealgorithms/searches/SentinelLinearSearch.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ public <T extends Comparable<T>> int find(T[] array, T key) {
6565

6666
int i = 0;
6767
// Search without bound checking since sentinel guarantees we'll find the key
68-
while (array[i].compareTo(key) != 0) {
68+
// Null check for array element to prevent NPE when array contains null elements
69+
while (array[i] != null && array[i].compareTo(key) != 0) {
6970
i++;
7071
}
7172

src/main/java/com/thealgorithms/strings/ReverseString.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ public static String reverse3(String string) {
6262
/**
6363
* Reverses the given string using a stack.
6464
* This method uses a stack to reverse the characters of the string.
65-
* * @param str The input string to be reversed.
65+
* @param str The input string to be reversed.
6666
* @return The reversed string.
6767
*/
6868
public static String reverseStringUsingStack(String str) {

0 commit comments

Comments
 (0)