Skip to content

style: enable AvoidStarImport in checkstyle #5141

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
May 5, 2024
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
2 changes: 1 addition & 1 deletion checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@

<!-- Checks for imports -->
<!-- See https://checkstyle.org/checks/imports/index.html -->
<!-- TODO <module name="AvoidStarImport"/> -->
<module name="AvoidStarImport"/>
<module name="IllegalImport"/> <!-- defaults to sun.* packages -->
<module name="RedundantImport"/>
<module name="UnusedImports">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
/**Wikipedia link -> https://en.wikipedia.org/wiki/Shortest_path_problem */
package com.thealgorithms.backtracking;

import java.util.*;
import java.util.ArrayList;
import java.util.List;

public class AllPathsFromSourceToTarget {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.thealgorithms.backtracking;

import java.util.*;
import java.util.List;
import java.util.TreeSet;

/**
* Finds all permutations of 1...n of length k
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.thealgorithms.backtracking;

import java.util.*;
import java.util.Arrays;
import java.util.LinkedList;
import java.util.List;
import java.util.TreeSet;

/**
* Finds all permutations of given array
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.thealgorithms.backtracking;

import java.util.*;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;

/*
* Problem Statement: -
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.thealgorithms.backtracking;

import java.util.*;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.Queue;
import java.util.Set;

/**
* @author Bama Charan Chhandogi (https://github.com/BamaCharanChhandogi)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,12 @@
import java.security.InvalidAlgorithmParameterException;
import java.security.InvalidKeyException;
import java.security.NoSuchAlgorithmException;
import javax.crypto.*;
import javax.crypto.BadPaddingException;
import javax.crypto.Cipher;
import javax.crypto.IllegalBlockSizeException;
import javax.crypto.KeyGenerator;
import javax.crypto.NoSuchPaddingException;
import javax.crypto.SecretKey;
import javax.crypto.spec.GCMParameterSpec;

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.thealgorithms.conversions;

import java.util.*;
import java.util.HashMap;
import java.util.Scanner;

/**
* Converts any Binary Number to a Hexadecimal Number
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.thealgorithms.conversions;

import java.util.*;
import java.util.HashMap;
import java.util.Map;

public class RomanToInteger {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.thealgorithms.datastructures.dynamicarray;

import java.util.*;
import java.util.Arrays;
import java.util.ConcurrentModificationException;
import java.util.Iterator;
import java.util.NoSuchElementException;
import java.util.Objects;
import java.util.function.Consumer;
import java.util.stream.Stream;
import java.util.stream.StreamSupport;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@
*/
package com.thealgorithms.datastructures.graphs;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Comparator;
import java.util.List;
import java.util.PriorityQueue;

public class A_Star {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.datastructures.graphs;

import java.util.*;
import java.util.Scanner;

class BellmanFord /*
* Implementation of Bellman ford to detect negative cycles. Graph accepts
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.thealgorithms.datastructures.heaps;

import java.util.*;
import java.util.ArrayList;
import java.util.HashMap;

public class GenericHeap<T extends Comparable<T>> {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
package com.thealgorithms.datastructures.lists;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import java.util.Random;
import java.util.stream.Collectors;
import java.util.stream.IntStream;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.thealgorithms.datastructures.trees;

import java.util.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.LinkedList;
import java.util.List;

/**
* Given tree is traversed in a 'post-order' way: LEFT -> RIGHT -> ROOT.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
package com.thealgorithms.datastructures.trees;

import java.util.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.Deque;
import java.util.LinkedList;
import java.util.List;

/**
* Given a binary tree.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.maths;

import java.util.*;
import java.util.Scanner;

/*
* @author Ojasva Jain
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
package com.thealgorithms.maths;

import java.math.BigInteger;
import java.util.*;
import java.util.ArrayList;
import java.util.List;

public class KaprekarNumbers {

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/thealgorithms/maths/KeithNumber.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.thealgorithms.maths;

import java.util.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

class KeithNumber {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
to the number itself. For example, 1, 2 and 145 are Krishnamurthy numbers. Krishnamurthy number is
also referred to as a Strong number.
*/
import java.io.*;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class KrishnamurthyNumber {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.maths;

import java.util.*;
import java.util.Scanner;

/**
* Is a common mathematics concept to find the smallest value number
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/maths/MagicSquare.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.maths;

import java.util.*;
import java.util.Scanner;

/*A magic square of order n is an arrangement of distinct n^2 integers,in a square, such that the n
numbers in all rows, all columns, and both diagonals sum to the same constant. A magic square
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.misc;

import java.util.*;
import java.util.Arrays;

public class RangeInSortedArray {

Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/misc/Sort012D.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.misc;

import java.util.*;
import java.util.Scanner;

/**
* The array is divided into four sections: a[1..Lo-1] zeroes a[Lo..Mid-1] ones
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/misc/Sparcity.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.misc;

import java.util.*;
import java.util.Scanner;

/*
*A matrix is sparse if many of its coefficients are zero (In general if 2/3rd of matrix elements
Expand Down
10 changes: 9 additions & 1 deletion src/main/java/com/thealgorithms/misc/ThreeSumProblem.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
package com.thealgorithms.misc;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Scanner;
import java.util.Set;

public class ThreeSumProblem {

Expand Down
8 changes: 7 additions & 1 deletion src/main/java/com/thealgorithms/misc/WordBoggle.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
package com.thealgorithms.misc;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;

public class WordBoggle {

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/thealgorithms/others/Conway.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.thealgorithms.others;

import java.util.*;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Conway {

Expand Down
5 changes: 4 additions & 1 deletion src/main/java/com/thealgorithms/others/Dijkstra.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
* https://rosettacode.org/wiki/Dijkstra%27s_algorithm#Java Also most of the
* comments are from RosettaCode.
*/
import java.util.*;
import java.util.HashMap;
import java.util.Map;
import java.util.NavigableSet;
import java.util.TreeSet;

public class Dijkstra {

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.others;

import java.util.*;
import java.util.Scanner;

public class InsertDeleteInArray {

Expand Down
4 changes: 3 additions & 1 deletion src/main/java/com/thealgorithms/others/KochSnowflake.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
package com.thealgorithms.others;

import java.awt.*;
import java.awt.BasicStroke;
import java.awt.Color;
import java.awt.Graphics2D;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/others/Mandelbrot.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.others;

import java.awt.*;
import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.File;
import java.io.IOException;
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/thealgorithms/others/PageRank.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.others;

import java.util.*;
import java.util.Scanner;

class PageRank {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* Given a matrix of size n x n We have to rotate this matrix by 90 Degree Here
* is the algorithm for this problem .
*/
import java.util.*;
import java.util.Scanner;

class Rotate_by_90_degree {

Expand Down
10 changes: 8 additions & 2 deletions src/main/java/com/thealgorithms/others/TopKWords.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
package com.thealgorithms.others;

import java.io.*;
import java.util.*;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;

/* display the most frequent K words in the file and the times it appear
in the file – shown in order (ignore case and periods) */
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package com.thealgorithms.scheduling;

import java.util.*;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.PriorityQueue;

/**
* Preemptive Priority Scheduling Algorithm
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
package com.thealgorithms.searches;

import com.thealgorithms.datastructures.Node;
import java.util.*;
import java.util.ArrayDeque;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.Queue;

/**
* @author: caos321
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package com.thealgorithms.searches;

import java.util.*;
import java.util.Scanner;

/*
Problem Statement:
Expand Down
Loading