Skip to content

Commit 0a244a3

Browse files
committed
fix: upgrade checkstyle and fix findings
1 parent 6edbb73 commit 0a244a3

File tree

6 files changed

+18
-13
lines changed

6 files changed

+18
-13
lines changed

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ configurations {
1818
// Apply the checkstyle plugin
1919
apply plugin: 'checkstyle'
2020
checkstyle {
21-
toolVersion = '10.3.4'
21+
toolVersion = '10.21.4'
2222
config = resources.text.fromArchiveEntry(configurations.checkstyleConfig, 'google_checks.xml')
2323
maxErrors = 0
2424
maxWarnings = 0

src/main/java/algorithm/LuhnModnSnippet.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ public static char characterFromCodePoint(int codePoint) {
5959
return CODE_POINTS.charAt(codePoint);
6060
}
6161

62+
/**
63+
* Returns the number of valid input characters.
64+
*
65+
* @return num valid input characters
66+
*/
6267
public static int numberOfValidInputCharacters() {
6368
return CODE_POINTS.length();
6469
}

src/main/java/array/ArrayConcatSnippet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class ArrayConcatSnippet {
3333

3434
/**
35-
* Generic 2 array concatenation Credits: Joachim Sauer https://stackoverflow.com/questions/80476/how-can-i-concatenate-two-arrays-in-java
35+
* Generic 2 array concatenation Credits: Joachim Sauer https://stackoverflow.com/questions/80476/how-can-i-concatenate-two-arrays-in-java.
3636
*
3737
* @param first is the first array (not null)
3838
* @param second is the second array (not null)

src/main/java/array/MultiArrayConcatenationSnippet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public class MultiArrayConcatenationSnippet {
3333

3434
/**
35-
* Generic N array concatenation Credits: Joachim Sauer https://stackoverflow.com/questions/80476/how-can-i-concatenate-two-arrays-in-java
35+
* Generic N array concatenation Credits: Joachim Sauer https://stackoverflow.com/questions/80476/how-can-i-concatenate-two-arrays-in-java.
3636
*
3737
* @param first is the first array (not null)
3838
* @param rest the rest of the arrays (optional)

src/main/java/cls/CreatingObjectSnippet.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,14 @@ public class CreatingObjectSnippet {
3737
* @param cls fully qualified name of class includes the package name as String
3838
* @return object
3939
* @throws NoSuchMethodException if a method that does not exist at runtime.
40-
* @throws IllegalAccessException <p>if an currently executing method does not have access to
41-
* the definition of the specified class, field, method or constructor</p>
42-
* @throws InvocationTargetException <p>InvocationTargetException is a checked exception
43-
* that wraps an exception thrown by an invoked method or constructor.</p>
44-
* @throws InstantiationException <p>when an method tries to create an instance of a class
45-
* using the newInstance method in class Class.</p>
46-
* @throws ClassNotFoundException <p>when an application tries to load in a class
47-
* through its string name.</p>
40+
* @throws IllegalAccessException if an currently executing method does not have access to
41+
* the definition of the specified class, field, method or constructor
42+
* @throws InvocationTargetException InvocationTargetException is a checked exception
43+
* that wraps an exception thrown by an invoked method or constructor.
44+
* @throws InstantiationException when an method tries to create an instance of a class
45+
* using the newInstance method in class Class.
46+
* @throws ClassNotFoundException when an application tries to load in a class
47+
* through its string name.
4848
*/
4949
public static Object createObject(String cls)
5050
throws NoSuchMethodException,

src/main/java/thread/ThreadPool.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
public class ThreadPool {
3434

3535
/**
36-
* <p>Creates pool of threads. Where the pool is the size of the number of processors
37-
* available to the Java virtual machine.</p>
36+
* Creates pool of threads. Where the pool is the size of the number of processors
37+
* available to the Java virtual machine.
3838
*
3939
* @return the newly created thread pool
4040
*/

0 commit comments

Comments
 (0)