diff --git a/pom.xml b/pom.xml index 577634a4c..ae449cdfa 100644 --- a/pom.xml +++ b/pom.xml @@ -76,7 +76,6 @@ -Xlint:all -Xlint:-auxiliaryclass - -Xlint:-unchecked -Werror diff --git a/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java b/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java index 223b70fed..c35a36d97 100644 --- a/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java +++ b/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java @@ -9,7 +9,7 @@ import java.util.List; * * @author Siddhant Swarup Mallick */ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class AllPathsFromSourceToTarget { // No. of vertices in graph diff --git a/src/main/java/com/thealgorithms/datastructures/buffers/CircularBuffer.java b/src/main/java/com/thealgorithms/datastructures/buffers/CircularBuffer.java index b709e16fd..3b89c2119 100644 --- a/src/main/java/com/thealgorithms/datastructures/buffers/CircularBuffer.java +++ b/src/main/java/com/thealgorithms/datastructures/buffers/CircularBuffer.java @@ -10,6 +10,7 @@ import java.util.concurrent.atomic.AtomicInteger; * * @param The type of elements stored in the circular buffer. */ +@SuppressWarnings("unchecked") public class CircularBuffer { private final Item[] buffer; private final CircularPointer putPointer; diff --git a/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java b/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java index edf466a9b..331d7196b 100644 --- a/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java +++ b/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java @@ -19,7 +19,7 @@ import java.util.PriorityQueue; * *

Time Complexity: O(E log V), where E is the number of edges and V is the number of vertices.

*/ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class Kruskal { /** diff --git a/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java b/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java index ff7230a9f..4bf21c7ed 100644 --- a/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java +++ b/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java @@ -22,7 +22,7 @@ import java.util.stream.IntStream; * For more information, see Graph Coloring. *

*/ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public final class WelshPowell { private static final int BLANK_COLOR = -1; // Constant representing an uncolored state diff --git a/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java b/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java index 62e68329b..36d2cc8df 100644 --- a/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java +++ b/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java @@ -23,7 +23,7 @@ import java.util.LinkedList; * @param the type of keys maintained by this hash map * @param the type of mapped values */ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class GenericHashMapUsingArray { private int size; // Total number of key-value pairs diff --git a/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java b/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java index 24caf9d70..63bb29034 100644 --- a/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java +++ b/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java @@ -10,7 +10,7 @@ import java.util.Objects; * * @param the type of elements in this list */ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class CursorLinkedList { /** diff --git a/src/main/java/com/thealgorithms/datastructures/lists/SkipList.java b/src/main/java/com/thealgorithms/datastructures/lists/SkipList.java index f297cb794..0b4fcd914 100644 --- a/src/main/java/com/thealgorithms/datastructures/lists/SkipList.java +++ b/src/main/java/com/thealgorithms/datastructures/lists/SkipList.java @@ -29,7 +29,7 @@ import java.util.stream.IntStream; * @param type of elements * @see Wiki. Skip list */ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class SkipList> { /** diff --git a/src/main/java/com/thealgorithms/datastructures/queues/QueueByTwoStacks.java b/src/main/java/com/thealgorithms/datastructures/queues/QueueByTwoStacks.java index 11e5e9b83..981b3b32e 100644 --- a/src/main/java/com/thealgorithms/datastructures/queues/QueueByTwoStacks.java +++ b/src/main/java/com/thealgorithms/datastructures/queues/QueueByTwoStacks.java @@ -11,6 +11,7 @@ import java.util.Stack; * * @param The type of elements held in this queue. */ +@SuppressWarnings("unchecked") public class QueueByTwoStacks { private final Stack enqueueStk; diff --git a/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java b/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java index 2368332c4..ba1def551 100644 --- a/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java +++ b/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java @@ -2,7 +2,7 @@ package com.thealgorithms.dynamicprogramming; import java.util.HashMap; -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) final class LongestArithmeticSubsequence { private LongestArithmeticSubsequence() { } diff --git a/src/main/java/com/thealgorithms/others/CRCAlgorithm.java b/src/main/java/com/thealgorithms/others/CRCAlgorithm.java index 284a290a5..00ddc86be 100644 --- a/src/main/java/com/thealgorithms/others/CRCAlgorithm.java +++ b/src/main/java/com/thealgorithms/others/CRCAlgorithm.java @@ -7,6 +7,7 @@ import java.util.concurrent.ThreadLocalRandom; /** * @author dimgrichr */ +@SuppressWarnings("unchecked") public class CRCAlgorithm { private int correctMess; diff --git a/src/main/java/com/thealgorithms/searches/FibonacciSearch.java b/src/main/java/com/thealgorithms/searches/FibonacciSearch.java index d6f53f8d9..78dac0f0a 100644 --- a/src/main/java/com/thealgorithms/searches/FibonacciSearch.java +++ b/src/main/java/com/thealgorithms/searches/FibonacciSearch.java @@ -15,7 +15,7 @@ import com.thealgorithms.devutils.searches.SearchAlgorithm; * Note: This algorithm requires that the input array be sorted. *

*/ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class FibonacciSearch implements SearchAlgorithm { /** diff --git a/src/main/java/com/thealgorithms/sorts/TimSort.java b/src/main/java/com/thealgorithms/sorts/TimSort.java index c592a74d1..13cd7fed3 100644 --- a/src/main/java/com/thealgorithms/sorts/TimSort.java +++ b/src/main/java/com/thealgorithms/sorts/TimSort.java @@ -7,7 +7,7 @@ import static com.thealgorithms.sorts.SortUtils.less; *

* For more details @see TimSort Algorithm */ -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) class TimSort implements SortAlgorithm { private static final int SUB_ARRAY_SIZE = 32; private Comparable[] aux; diff --git a/src/test/java/com/thealgorithms/datastructures/graphs/KruskalTest.java b/src/test/java/com/thealgorithms/datastructures/graphs/KruskalTest.java index c30dd2df2..7291cd6c3 100644 --- a/src/test/java/com/thealgorithms/datastructures/graphs/KruskalTest.java +++ b/src/test/java/com/thealgorithms/datastructures/graphs/KruskalTest.java @@ -10,7 +10,7 @@ import java.util.List; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class KruskalTest { private Kruskal kruskal; diff --git a/src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java b/src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java index 561309e22..153ab3347 100644 --- a/src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java +++ b/src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java @@ -8,7 +8,7 @@ import org.junit.jupiter.params.ParameterizedTest; import org.junit.jupiter.params.provider.Arguments; import org.junit.jupiter.params.provider.MethodSource; -@SuppressWarnings("rawtypes") +@SuppressWarnings({"rawtypes", "unchecked"}) public class NumberOfDigitsTest { @ParameterizedTest