From 8ed012edf72cd3f40329e29c2b339ea22ee24abc Mon Sep 17 00:00:00 2001
From: vil02 <65706193+vil02@users.noreply.github.com>
Date: Thu, 5 Jun 2025 12:14:19 +0200
Subject: [PATCH] chore: suppress `rawtypes` in selected classes
---
pom.xml | 1 -
.../thealgorithms/backtracking/AllPathsFromSourceToTarget.java | 1 +
.../thealgorithms/datastructures/bloomfilter/BloomFilter.java | 1 +
.../java/com/thealgorithms/datastructures/graphs/Kruskal.java | 1 +
.../com/thealgorithms/datastructures/graphs/WelshPowell.java | 1 +
.../datastructures/hashmap/hashing/GenericHashMapUsingArray.java | 1 +
.../thealgorithms/datastructures/hashmap/hashing/HashMap.java | 1 +
.../datastructures/hashmap/hashing/LinearProbingHashMap.java | 1 +
.../com/thealgorithms/datastructures/lists/CircleLinkedList.java | 1 +
.../com/thealgorithms/datastructures/lists/CursorLinkedList.java | 1 +
.../java/com/thealgorithms/datastructures/lists/SkipList.java | 1 +
.../dynamicprogramming/LongestArithmeticSubsequence.java | 1 +
.../java/com/thealgorithms/misc/PalindromeSinglyLinkedList.java | 1 +
src/main/java/com/thealgorithms/searches/FibonacciSearch.java | 1 +
src/main/java/com/thealgorithms/sorts/MergeSort.java | 1 +
src/main/java/com/thealgorithms/sorts/SortAlgorithm.java | 1 +
src/main/java/com/thealgorithms/sorts/SpreadSort.java | 1 +
src/main/java/com/thealgorithms/sorts/TimSort.java | 1 +
.../com/thealgorithms/datastructures/graphs/KruskalTest.java | 1 +
src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java | 1 +
20 files changed, 19 insertions(+), 1 deletion(-)
diff --git a/pom.xml b/pom.xml
index b4ca8562ff9d..577634a4ceaa 100644
--- a/pom.xml
+++ b/pom.xml
@@ -76,7 +76,6 @@
-Xlint:all
-Xlint:-auxiliaryclass
- -Xlint:-rawtypes
-Xlint:-unchecked
-Werror
diff --git a/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java b/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java
index 6f93b704ffb2..223b70fed66f 100644
--- a/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java
+++ b/src/main/java/com/thealgorithms/backtracking/AllPathsFromSourceToTarget.java
@@ -9,6 +9,7 @@
*
* @author Siddhant Swarup Mallick
*/
+@SuppressWarnings("rawtypes")
public class AllPathsFromSourceToTarget {
// No. of vertices in graph
diff --git a/src/main/java/com/thealgorithms/datastructures/bloomfilter/BloomFilter.java b/src/main/java/com/thealgorithms/datastructures/bloomfilter/BloomFilter.java
index a2edd3db2d8e..d60b95110fc2 100644
--- a/src/main/java/com/thealgorithms/datastructures/bloomfilter/BloomFilter.java
+++ b/src/main/java/com/thealgorithms/datastructures/bloomfilter/BloomFilter.java
@@ -12,6 +12,7 @@
*
* @param The type of elements to be stored in the Bloom filter.
*/
+@SuppressWarnings("rawtypes")
public class BloomFilter {
private final int numberOfHashFunctions;
diff --git a/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java b/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java
index 25c4548daa7a..edf466a9b2ec 100644
--- a/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java
+++ b/src/main/java/com/thealgorithms/datastructures/graphs/Kruskal.java
@@ -19,6 +19,7 @@
*
* Time Complexity: O(E log V), where E is the number of edges and V is the number of vertices.
*/
+@SuppressWarnings("rawtypes")
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 26ca97736fe9..ff7230a9f348 100644
--- a/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java
+++ b/src/main/java/com/thealgorithms/datastructures/graphs/WelshPowell.java
@@ -22,6 +22,7 @@
* For more information, see Graph Coloring.
*
*/
+@SuppressWarnings("rawtypes")
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 3637e323f097..62e68329b47b 100644
--- a/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java
+++ b/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/GenericHashMapUsingArray.java
@@ -23,6 +23,7 @@
* @param the type of keys maintained by this hash map
* @param the type of mapped values
*/
+@SuppressWarnings("rawtypes")
public class GenericHashMapUsingArray {
private int size; // Total number of key-value pairs
diff --git a/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java b/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java
index aed39c941430..1b0792b8a738 100644
--- a/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java
+++ b/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/HashMap.java
@@ -8,6 +8,7 @@
* @param the type of keys maintained by this map
* @param the type of mapped values
*/
+@SuppressWarnings("rawtypes")
public class HashMap {
private final int hashSize;
private final LinkedList[] buckets;
diff --git a/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/LinearProbingHashMap.java b/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/LinearProbingHashMap.java
index 10d5dc7decae..761a5fe83d18 100644
--- a/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/LinearProbingHashMap.java
+++ b/src/main/java/com/thealgorithms/datastructures/hashmap/hashing/LinearProbingHashMap.java
@@ -34,6 +34,7 @@
* @param the type of keys maintained by this map
* @param the type of mapped values
*/
+@SuppressWarnings("rawtypes")
public class LinearProbingHashMap, Value> extends Map {
private int hsize; // size of the hash table
private Key[] keys; // array to store keys
diff --git a/src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java b/src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java
index 422e8953625f..72a12cd58401 100644
--- a/src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java
+++ b/src/main/java/com/thealgorithms/datastructures/lists/CircleLinkedList.java
@@ -10,6 +10,7 @@
*
* @param the type of elements held in this list
*/
+@SuppressWarnings("rawtypes")
public class CircleLinkedList {
/**
diff --git a/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java b/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java
index ff3d39115c3b..24caf9d70bfe 100644
--- a/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java
+++ b/src/main/java/com/thealgorithms/datastructures/lists/CursorLinkedList.java
@@ -10,6 +10,7 @@
*
* @param the type of elements in this list
*/
+@SuppressWarnings("rawtypes")
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 3309ab24917d..f297cb79494c 100644
--- a/src/main/java/com/thealgorithms/datastructures/lists/SkipList.java
+++ b/src/main/java/com/thealgorithms/datastructures/lists/SkipList.java
@@ -29,6 +29,7 @@
* @param type of elements
* @see Wiki. Skip list
*/
+@SuppressWarnings("rawtypes")
public class SkipList> {
/**
diff --git a/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java b/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java
index b5ac62b4674b..2368332c410f 100644
--- a/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java
+++ b/src/main/java/com/thealgorithms/dynamicprogramming/LongestArithmeticSubsequence.java
@@ -2,6 +2,7 @@
import java.util.HashMap;
+@SuppressWarnings("rawtypes")
final class LongestArithmeticSubsequence {
private LongestArithmeticSubsequence() {
}
diff --git a/src/main/java/com/thealgorithms/misc/PalindromeSinglyLinkedList.java b/src/main/java/com/thealgorithms/misc/PalindromeSinglyLinkedList.java
index 51dc099ba32e..c81476eaec32 100644
--- a/src/main/java/com/thealgorithms/misc/PalindromeSinglyLinkedList.java
+++ b/src/main/java/com/thealgorithms/misc/PalindromeSinglyLinkedList.java
@@ -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() {
}
diff --git a/src/main/java/com/thealgorithms/searches/FibonacciSearch.java b/src/main/java/com/thealgorithms/searches/FibonacciSearch.java
index 2124938bc258..d6f53f8d944a 100644
--- a/src/main/java/com/thealgorithms/searches/FibonacciSearch.java
+++ b/src/main/java/com/thealgorithms/searches/FibonacciSearch.java
@@ -15,6 +15,7 @@
* Note: This algorithm requires that the input array be sorted.
*
*/
+@SuppressWarnings("rawtypes")
public class FibonacciSearch implements SearchAlgorithm {
/**
diff --git a/src/main/java/com/thealgorithms/sorts/MergeSort.java b/src/main/java/com/thealgorithms/sorts/MergeSort.java
index 9949783ca21b..86a184f67b26 100644
--- a/src/main/java/com/thealgorithms/sorts/MergeSort.java
+++ b/src/main/java/com/thealgorithms/sorts/MergeSort.java
@@ -7,6 +7,7 @@
*
* @see SortAlgorithm
*/
+@SuppressWarnings("rawtypes")
class MergeSort implements SortAlgorithm {
private Comparable[] aux;
diff --git a/src/main/java/com/thealgorithms/sorts/SortAlgorithm.java b/src/main/java/com/thealgorithms/sorts/SortAlgorithm.java
index 7a3ded37bf3f..72b046d12861 100644
--- a/src/main/java/com/thealgorithms/sorts/SortAlgorithm.java
+++ b/src/main/java/com/thealgorithms/sorts/SortAlgorithm.java
@@ -8,6 +8,7 @@
*
* @author Podshivalov Nikita (https://github.com/nikitap492)
*/
+@SuppressWarnings("rawtypes")
public interface SortAlgorithm {
/**
* Main method arrays sorting algorithms
diff --git a/src/main/java/com/thealgorithms/sorts/SpreadSort.java b/src/main/java/com/thealgorithms/sorts/SpreadSort.java
index f1fd24f4735d..1401f3d454a8 100644
--- a/src/main/java/com/thealgorithms/sorts/SpreadSort.java
+++ b/src/main/java/com/thealgorithms/sorts/SpreadSort.java
@@ -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;
diff --git a/src/main/java/com/thealgorithms/sorts/TimSort.java b/src/main/java/com/thealgorithms/sorts/TimSort.java
index 2d5bca2ef6f3..c592a74d1c8f 100644
--- a/src/main/java/com/thealgorithms/sorts/TimSort.java
+++ b/src/main/java/com/thealgorithms/sorts/TimSort.java
@@ -7,6 +7,7 @@
*
* For more details @see TimSort Algorithm
*/
+@SuppressWarnings("rawtypes")
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 b18f161ef1a6..c30dd2df26c5 100644
--- a/src/test/java/com/thealgorithms/datastructures/graphs/KruskalTest.java
+++ b/src/test/java/com/thealgorithms/datastructures/graphs/KruskalTest.java
@@ -10,6 +10,7 @@
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
+@SuppressWarnings("rawtypes")
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 799052b22d83..561309e22ac9 100644
--- a/src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java
+++ b/src/test/java/com/thealgorithms/maths/NumberOfDigitsTest.java
@@ -8,6 +8,7 @@
import org.junit.jupiter.params.provider.Arguments;
import org.junit.jupiter.params.provider.MethodSource;
+@SuppressWarnings("rawtypes")
public class NumberOfDigitsTest {
@ParameterizedTest
pFad - Phonifier reborn
Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies:
Alternative Proxy
pFad Proxy
pFad v3 Proxy
pFad v4 Proxy