Skip to content

Commit

Permalink
style: do not suppress this-escape (#5166)
Browse files Browse the repository at this point in the history
  • Loading branch information
vil02 committed May 20, 2024
1 parent 324969f commit 8be8b95
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 6 deletions.
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
<arg>-Xlint:-try</arg>
<arg>-Xlint:-unchecked</arg>
<arg>-Xlint:-lossy-conversions</arg>
<arg>-Xlint:-this-escape</arg>
<arg>-Werror</arg>
</compilerArgs>
</configuration>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/ciphers/RSA.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public synchronized BigInteger decrypt(BigInteger encryptedMessage) {
/**
* Generate a new public and private key set.
*/
public synchronized void generateKeys(int bits) {
public final synchronized void generateKeys(int bits) {
SecureRandom r = new SecureRandom();
BigInteger p = new BigInteger(bits / 2, 100, r);
BigInteger q = new BigInteger(bits / 2, 100, r);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ private HeapElement extractMax() {
}

@Override
public void insertElement(HeapElement element) {
public final void insertElement(HeapElement element) {
maxHeap.add(element);
toggleUp(maxHeap.size());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private HeapElement extractMin() {
}

@Override
public void insertElement(HeapElement element) {
public final void insertElement(HeapElement element) {
minHeap.add(element);
toggleUp(minHeap.size());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
*
* @author Unknown
*/
public class DoublyLinkedList {
public final class DoublyLinkedList {

/**
* Head refers to the front of the list
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public SegmentTree(int n, int[] arr) {
}

/* A function which will create the segment tree*/
public int constructTree(int[] arr, int start, int end, int index) {
public final int constructTree(int[] arr, int start, int end, int index) {
if (start == end) {
this.seg_t[index] = arr[start];
return arr[start];
Expand Down

0 comments on commit 8be8b95

Please sign in to comment.