diff --git a/pom.xml b/pom.xml
index ead4fb6dd0f0..21b5ec350917 100644
--- a/pom.xml
+++ b/pom.xml
@@ -82,7 +82,6 @@
-Xlint:-try
-Xlint:-unchecked
-Xlint:-lossy-conversions
- -Xlint:-this-escape
-Werror
diff --git a/src/main/java/com/thealgorithms/ciphers/RSA.java b/src/main/java/com/thealgorithms/ciphers/RSA.java
index aea15c3554c0..f50e501e68c8 100644
--- a/src/main/java/com/thealgorithms/ciphers/RSA.java
+++ b/src/main/java/com/thealgorithms/ciphers/RSA.java
@@ -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);
diff --git a/src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java b/src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java
index 4edf02679eb4..9a584da0411c 100644
--- a/src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java
+++ b/src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java
@@ -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());
}
diff --git a/src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java b/src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java
index f220fe492399..f7ff0ec5a73d 100644
--- a/src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java
+++ b/src/main/java/com/thealgorithms/datastructures/heaps/MinHeap.java
@@ -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());
}
diff --git a/src/main/java/com/thealgorithms/datastructures/lists/DoublyLinkedList.java b/src/main/java/com/thealgorithms/datastructures/lists/DoublyLinkedList.java
index 7f10d7cd93a6..58898ddc0fcf 100644
--- a/src/main/java/com/thealgorithms/datastructures/lists/DoublyLinkedList.java
+++ b/src/main/java/com/thealgorithms/datastructures/lists/DoublyLinkedList.java
@@ -13,7 +13,7 @@
*
* @author Unknown
*/
-public class DoublyLinkedList {
+public final class DoublyLinkedList {
/**
* Head refers to the front of the list
diff --git a/src/main/java/com/thealgorithms/datastructures/trees/SegmentTree.java b/src/main/java/com/thealgorithms/datastructures/trees/SegmentTree.java
index 295628334516..55efe30adcd8 100644
--- a/src/main/java/com/thealgorithms/datastructures/trees/SegmentTree.java
+++ b/src/main/java/com/thealgorithms/datastructures/trees/SegmentTree.java
@@ -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];