style: enable ModifierOrder in checkstyle (#5132)

* style: enable `ModifierOrder` in checkstyle

* style: remove redundant `final`

Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>

---------

Co-authored-by: Maria Paszkiewicz SCC <maria.paszkiewicz@kit.edu>
Co-authored-by: Piotr Idzik <65706193+vil02@users.noreply.github.com>
This commit is contained in:
marysiuniq 2024-05-01 13:06:19 +02:00 committed by GitHub
parent fd65892415
commit 06a284f811
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 7 additions and 7 deletions

View File

@ -147,7 +147,7 @@
<!-- Modifier Checks -->
<!-- See https://checkstyle.org/checks/modifier/index.html -->
<!-- TODO <module name="ModifierOrder"/> -->
<module name="ModifierOrder"/>
<!-- TODO <module name="RedundantModifier"/> -->
<!-- Checks for blocks. You know, those {}'s -->

View File

@ -12,7 +12,7 @@ public final class HighestSetBit {
private HighestSetBit() {
}
public final static Optional<Integer> findHighestSetBit(int num) {
public static Optional<Integer> findHighestSetBit(int num) {
if (num < 0) {
throw new IllegalArgumentException("Input cannot be negative");
}

View File

@ -3,7 +3,7 @@ package com.thealgorithms.others;
/**
* @author Marcus
*/
final public class CountWords {
public final class CountWords {
private CountWords() {
}

View File

@ -3,7 +3,7 @@ package com.thealgorithms.others;
/**
* @brief utility class for <a href="https://en.wikipedia.org/wiki/Euler%27s_totient_function">Euler's totient function</a>
*/
final public class EulersFunction {
public final class EulersFunction {
private EulersFunction() {
}

View File

@ -6,7 +6,7 @@ import java.util.ArrayList;
* @brief Class for finding the lowest base in which a given integer is a palindrome.
cf. https://oeis.org/A016026
*/
final public class LowestBasePalindrome {
public final class LowestBasePalindrome {
private LowestBasePalindrome() {
}

View File

@ -5,7 +5,7 @@ import java.util.Arrays;
/**
* @brief utility class implementing <a href="https://en.wikipedia.org/wiki/Sieve_of_Eratosthenes">Sieve of Eratosthenes</a>
*/
final public class SieveOfEratosthenes {
public final class SieveOfEratosthenes {
private SieveOfEratosthenes() {
}

View File

@ -1,6 +1,6 @@
package com.thealgorithms.others.cn;
final public class HammingDistance {
public final class HammingDistance {
private HammingDistance() {
}