Skip to content

Commit 7602f1e

Browse files
authored
chore: suppress unchecked in selected classes (#6262)
1 parent ec6f09c commit 7602f1e

File tree

15 files changed

+14
-12
lines changed

15 files changed

+14
-12
lines changed

pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
<compilerArgs>
7777
<arg>-Xlint:all</arg>
7878
<arg>-Xlint:-auxiliaryclass</arg>
79-
<arg>-Xlint:-unchecked</arg>
8079
<arg>-Werror</arg>
8180
</compilerArgs>
8281
</configuration>

src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
* @author <a href="https://github.com/siddhant2002">Siddhant Swarup Mallick</a>
1111
*/
12-
@SuppressWarnings("rawtypes")
12+
@SuppressWarnings({"rawtypes", "unchecked"})
1313
public class AllPathsFromSourceToTarget {
1414

1515
// No. of vertices in graph

src/main/java/com/thealgorithms/datastructures/buffers/CircularBuffer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
*
1111
* @param <Item> The type of elements stored in the circular buffer.
1212
*/
13+
@SuppressWarnings("unchecked")
1314
public class CircularBuffer<Item> {
1415
private final Item[] buffer;
1516
private final CircularPointer putPointer;

src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
*
2020
* <p><strong>Time Complexity:</strong> O(E log V), where E is the number of edges and V is the number of vertices.</p>
2121
*/
22-
@SuppressWarnings("rawtypes")
22+
@SuppressWarnings({"rawtypes", "unchecked"})
2323
public class Kruskal {
2424

2525
/**

src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
* For more information, see <a href="https://en.wikipedia.org/wiki/Graph_coloring">Graph Coloring</a>.
2323
* </p>
2424
*/
25-
@SuppressWarnings("rawtypes")
25+
@SuppressWarnings({"rawtypes", "unchecked"})
2626
public final class WelshPowell {
2727
private static final int BLANK_COLOR = -1; // Constant representing an uncolored state
2828

src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
* @param <K> the type of keys maintained by this hash map
2424
* @param <V> the type of mapped values
2525
*/
26-
@SuppressWarnings("rawtypes")
26+
@SuppressWarnings({"rawtypes", "unchecked"})
2727
public class GenericHashMapUsingArray<K, V> {
2828

2929
private int size; // Total number of key-value pairs

src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
* @param <T> the type of elements in this list
1212
*/
13-
@SuppressWarnings("rawtypes")
13+
@SuppressWarnings({"rawtypes", "unchecked"})
1414
public class CursorLinkedList<T> {
1515

1616
/**

src/main/java/com/thealgorithms/datastructures/lists/SkipList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* @param <E> type of elements
3030
* @see <a href="https://en.wikipedia.org/wiki/Skip_list">Uncyclo. Skip list</a>
3131
*/
32-
@SuppressWarnings("rawtypes")
32+
@SuppressWarnings({"rawtypes", "unchecked"})
3333
public class SkipList<E extends Comparable<E>> {
3434

3535
/**

src/main/java/com/thealgorithms/datastructures/queues/QueueByTwoStacks.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
*
1212
* @param <T> The type of elements held in this queue.
1313
*/
14+
@SuppressWarnings("unchecked")
1415
public class QueueByTwoStacks<T> {
1516

1617
private final Stack<T> enqueueStk;

src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import java.util.HashMap;
44

5-
@SuppressWarnings("rawtypes")
5+
@SuppressWarnings({"rawtypes", "unchecked"})
66
final class LongestArithmeticSubsequence {
77
private LongestArithmeticSubsequence() {
88
}

src/main/java/com/thealgorithms/others/CRCAlgorithm.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/**
88
* @author dimgrichr
99
*/
10+
@SuppressWarnings("unchecked")
1011
public class CRCAlgorithm {
1112

1213
private int correctMess;

src/main/java/com/thealgorithms/searches/FibonacciSearch.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* Note: This algorithm requires that the input array be sorted.
1616
* </p>
1717
*/
18-
@SuppressWarnings("rawtypes")
18+
@SuppressWarnings({"rawtypes", "unchecked"})
1919
public class FibonacciSearch implements SearchAlgorithm {
2020

2121
/**

src/main/java/com/thealgorithms/sorts/TimSort.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
* <p>
88
* For more details @see <a href="https://en.wikipedia.org/wiki/Timsort">TimSort Algorithm</a>
99
*/
10-
@SuppressWarnings("rawtypes")
10+
@SuppressWarnings({"rawtypes", "unchecked"})
1111
class TimSort implements SortAlgorithm {
1212
private static final int SUB_ARRAY_SIZE = 32;
1313
private Comparable[] aux;

src/test/java/com/thealgorithms/datastructures/graphs/KruskalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import org.junit.jupiter.api.BeforeEach;
1111
import org.junit.jupiter.api.Test;
1212

13-
@SuppressWarnings("rawtypes")
13+
@SuppressWarnings({"rawtypes", "unchecked"})
1414
public class KruskalTest {
1515

1616
private Kruskal kruskal;

src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import org.junit.jupiter.params.provider.Arguments;
99
import org.junit.jupiter.params.provider.MethodSource;
1010

11-
@SuppressWarnings("rawtypes")
11+
@SuppressWarnings({"rawtypes", "unchecked"})
1212
public class NumberOfDigitsTest {
1313

1414
@ParameterizedTest

0 commit comments

Comments
 (0)