diff --git a/pom.xml b/pom.xml
index ead4fb6d..21b5ec35 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 aea15c35..f50e501e 100644
--- a/src/main/java/com/thealgorithms/ciphers/RSA.java
+++ b/src/main/java/com/thealgorithms/ciphers/RSA.java
@@ -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);
diff --git a/src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java b/src/main/java/com/thealgorithms/datastructures/heaps/MaxHeap.java
index 4edf0267..9a584da0 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 @@ public class MaxHeap implements Heap {
}
@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 f220fe49..f7ff0ec5 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 @@ public class MinHeap implements Heap {
}
@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 7f10d7cd..58898ddc 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 @@ package com.thealgorithms.datastructures.lists;
*
* @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 29562833..55efe30a 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 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];