Skip to content

Commit 89219e8

Browse files
committed
PMD fix
1 parent 05b4991 commit 89219e8

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pmd-exclude.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@ com.thealgorithms.maths.KaprekarNumbers=UselessParentheses
4646
com.thealgorithms.maths.KeithNumber=UselessParentheses
4747
com.thealgorithms.maths.LeonardoNumber=UselessParentheses
4848
com.thealgorithms.maths.LinearDiophantineEquationsSolver=UselessParentheses
49+
com.thealgorithms.maths.MatrixUtil=UselessParentheses
4950
com.thealgorithms.maths.RomanNumeralUtil=UselessParentheses
5051
com.thealgorithms.maths.SecondMinMax=UselessParentheses
5152
com.thealgorithms.maths.SecondMinMaxTest=UnnecessaryFullyQualifiedName

src/main/java/com/thealgorithms/matrix/utils/MatrixUtil.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ private static boolean isValid(final BigDecimal[][] matrix) {
1919
}
2020

2121
private static boolean hasEqualSizes(final BigDecimal[][] matrix1, final BigDecimal[][] matrix2) {
22-
return (isValid(matrix1) && isValid(matrix2) && matrix1.length == matrix2.length && matrix1[0].length == matrix2[0].length);
22+
return isValid(matrix1) && isValid(matrix2) && matrix1.length == matrix2.length && matrix1[0].length == matrix2[0].length;
2323
}
2424

2525
private static boolean canMultiply(final BigDecimal[][] matrix1, final BigDecimal[][] matrix2) {
26-
return (isValid(matrix1) && isValid(matrix2) && matrix1[0].length == matrix2.length);
26+
return isValid(matrix1) && isValid(matrix2) && matrix1[0].length == matrix2.length;
2727
}
2828

2929
public static void validateInputMatrix(double[][] matrix) {

0 commit comments

Comments
 (0)