style: do not suppress this-escape
(#5166)
This commit is contained in:
parent
324969fc4e
commit
8be8b953ab
1
pom.xml
1
pom.xml
@ -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>
|
||||
|
@ -47,7 +47,7 @@ public class RSA {
|
||||
/**
|
||||
* 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);
|
||||
|
@ -91,7 +91,7 @@ public class MaxHeap implements Heap {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertElement(HeapElement element) {
|
||||
public final void insertElement(HeapElement element) {
|
||||
maxHeap.add(element);
|
||||
toggleUp(maxHeap.size());
|
||||
}
|
||||
|
@ -85,7 +85,7 @@ public class MinHeap implements Heap {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insertElement(HeapElement element) {
|
||||
public final void insertElement(HeapElement element) {
|
||||
minHeap.add(element);
|
||||
toggleUp(minHeap.size());
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ package com.thealgorithms.datastructures.lists;
|
||||
*
|
||||
* @author Unknown
|
||||
*/
|
||||
public class DoublyLinkedList {
|
||||
public final class DoublyLinkedList {
|
||||
|
||||
/**
|
||||
* Head refers to the front of the list
|
||||
|
@ -19,7 +19,7 @@ public class SegmentTree {
|
||||
}
|
||||
|
||||
/* 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];
|
||||
|
Loading…
Reference in New Issue
Block a user