Skip to content

chore: suppress rawtypes in selected classes #6261

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@
<compilerArgs>
<arg>-Xlint:all</arg>
<arg>-Xlint:-auxiliaryclass</arg>
<arg>-Xlint:-rawtypes</arg>
<arg>-Xlint:-unchecked</arg>
<arg>-Werror</arg>
</compilerArgs>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*
* @author <a href="https://github.com/siddhant2002">Siddhant Swarup Mallick</a>
*/
@SuppressWarnings("rawtypes")
public class AllPathsFromSourceToTarget {

// No. of vertices in graph
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*
* @param <T> The type of elements to be stored in the Bloom filter.
*/
@SuppressWarnings("rawtypes")
public class BloomFilter<T> {

private final int numberOfHashFunctions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
*
* <p><strong>Time Complexity:</strong> O(E log V), where E is the number of edges and V is the number of vertices.</p>
*/
@SuppressWarnings("rawtypes")
public class Kruskal {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
* For more information, see <a href="https://en.wikipedia.org/wiki/Graph_coloring">Graph Coloring</a>.
* </p>
*/
@SuppressWarnings("rawtypes")
public final class WelshPowell {
private static final int BLANK_COLOR = -1; // Constant representing an uncolored state

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
* @param <K> the type of keys maintained by this hash map
* @param <V> the type of mapped values
*/
@SuppressWarnings("rawtypes")
public class GenericHashMapUsingArray<K, V> {

private int size; // Total number of key-value pairs
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* @param <K> the type of keys maintained by this map
* @param <V> the type of mapped values
*/
@SuppressWarnings("rawtypes")
public class HashMap<K, V> {
private final int hashSize;
private final LinkedList<K, V>[] buckets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
* @param <Key> the type of keys maintained by this map
* @param <Value> the type of mapped values
*/
@SuppressWarnings("rawtypes")
public class LinearProbingHashMap<Key extends Comparable<Key>, Value> extends Map<Key, Value> {
private int hsize; // size of the hash table
private Key[] keys; // array to store keys
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* @param <E> the type of elements held in this list
*/
@SuppressWarnings("rawtypes")
public class CircleLinkedList<E> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
*
* @param <T> the type of elements in this list
*/
@SuppressWarnings("rawtypes")
public class CursorLinkedList<T> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
* @param <E> type of elements
* @see <a href="https://en.wikipedia.org/wiki/Skip_list">Wiki. Skip list</a>
*/
@SuppressWarnings("rawtypes")
public class SkipList<E extends Comparable<E>> {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import java.util.HashMap;

@SuppressWarnings("rawtypes")
final class LongestArithmeticSubsequence {
private LongestArithmeticSubsequence() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
* See more:
* https://www.geeksforgeeks.org/function-to-check-if-a-singly-linked-list-is-palindrome/
*/
@SuppressWarnings("rawtypes")
public final class PalindromeSinglyLinkedList {
private PalindromeSinglyLinkedList() {
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Note: This algorithm requires that the input array be sorted.
* </p>
*/
@SuppressWarnings("rawtypes")
public class FibonacciSearch implements SearchAlgorithm {

/**
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/thealgorithms/sorts/MergeSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
*
* @see SortAlgorithm
*/
@SuppressWarnings("rawtypes")
class MergeSort implements SortAlgorithm {

private Comparable[] aux;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/thealgorithms/sorts/SortAlgorithm.java
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*
* @author Podshivalov Nikita (https://github.com/nikitap492)
*/
@SuppressWarnings("rawtypes")
public interface SortAlgorithm {
/**
* Main method arrays sorting algorithms
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/thealgorithms/sorts/SpreadSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* It distributes elements into buckets and recursively sorts these buckets.
* This implementation is generic and can sort any array of elements that extend Comparable.
*/
@SuppressWarnings("rawtypes")
public class SpreadSort implements SortAlgorithm {
private static final int MAX_INSERTION_SORT_THRESHOLD = 1000;
private static final int MAX_INITIAL_BUCKET_CAPACITY = 1000;
Expand Down
1 change: 1 addition & 0 deletions src/main/java/com/thealgorithms/sorts/TimSort.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
* <p>
* For more details @see <a href="https://en.wikipedia.org/wiki/Timsort">TimSort Algorithm</a>
*/
@SuppressWarnings("rawtypes")
class TimSort implements SortAlgorithm {
private static final int SUB_ARRAY_SIZE = 32;
private Comparable[] aux;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;

@SuppressWarnings("rawtypes")
public class KruskalTest {

private Kruskal kruskal;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;

@SuppressWarnings("rawtypes")
public class NumberOfDigitsTest {

@ParameterizedTest
Expand Down