The following document contains the results of PMD 7.17.0.
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'apply': the method is declared in an interface type | 28 |
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'apply': the method is declared in an interface type | 40 |
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'apply': the method is declared in an interface type | 48 |
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'accept': the method is declared in an interface type | 55 |
| Rule | Violation | Line |
|---|---|---|
| UnnecessarySemicolon | Unnecessary semicolon | 111 |
| UnnecessarySemicolon | Unnecessary semicolon | 120 |
| UnnecessarySemicolon | Unnecessary semicolon | 129 |
| Rule | Violation | Line |
|---|---|---|
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 37 |
| Rule | Violation | Line |
|---|---|---|
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 37 |
| Rule | Violation | Line |
|---|---|---|
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 36 |
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 39 |
| Rule | Violation | Line |
|---|---|---|
| OverrideBothEqualsAndHashcode | Ensure you override both equals() and hashCode() | 70 |
| Rule | Violation | Line |
|---|---|---|
| EmptyCatchBlock | Avoid empty catch blocks | 61–63 |
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 103 |
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 104 |
| Rule | Violation | Line |
|---|---|---|
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 40 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 40 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 47 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 47 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 50 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 50 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 59 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 59 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 67 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 73 |
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryImport | Unused import 'calculator.atoms.Real' | 12 |
| UnnecessaryImport | Unused import 'calculator.operations.*' | 13 |
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 60 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 69 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 79 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 89 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 100 |
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'java.math': 'BigDecimal' is already in scope because it is imported in this file | 36 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'java.math': 'BigDecimal' is already in scope because it is imported in this file | 39 |
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryImport | Unused import 'java.math.RoundingMode' | 3 |
| UselessParentheses | Useless parentheses around `l / r`. | 50 |
| Rule | Violation | Line |
|---|---|---|
| UselessParentheses | Useless parentheses around `l - r`. | 46 |
| Rule | Violation | Line |
|---|---|---|
| UnnecessaryImport | Unused import 'org.apache.commons.numbers.fraction.Fraction' | 13 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryImport | Unused import 'calculator.atoms.Real' | 4 | 12 |
| UnnecessaryImport | Unused import 'calculator.operations.*' | 4 | 13 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'apply': the method is declared in an interface type | 3 | 28 |
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'apply': the method is declared in an interface type | 3 | 40 |
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'apply': the method is declared in an interface type | 3 | 48 |
| UnnecessaryModifier | Unnecessary modifier 'public' on method 'accept': the method is declared in an interface type | 3 | 55 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 4 | 60 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 4 | 69 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 4 | 79 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 4 | 89 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'Real': 'scale' is already in scope because it is declared in an enclosing type | 4 | 100 |
| UnnecessarySemicolon | Unnecessary semicolon | 3 | 111 |
| UnnecessarySemicolon | Unnecessary semicolon | 3 | 120 |
| UnnecessarySemicolon | Unnecessary semicolon | 3 | 129 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 37 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 37 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 3 | 36 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'java.math': 'BigDecimal' is already in scope because it is imported in this file | 4 | 36 |
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 3 | 39 |
| UnnecessaryFullyQualifiedName | Unnecessary qualifier 'java.math': 'BigDecimal' is already in scope because it is imported in this file | 4 | 39 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| OverrideBothEqualsAndHashcode | Ensure you override both equals() and hashCode() | 3 | 70 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| EmptyCatchBlock | Avoid empty catch blocks | 3 | 61–63 |
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 3 | 103 |
| AvoidDecimalLiteralsInBigDecimalConstructor | Avoid creating BigDecimal with a decimal (float/double) literal. Use a String literal | 3 | 104 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryImport | Unused import 'java.math.RoundingMode' | 4 | 3 |
| UselessParentheses | Useless parentheses around `l / r`. | 4 | 50 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UselessParentheses | Useless parentheses around `l - r`. | 4 | 46 |
| Rule | Violation | Priority | Line |
|---|---|---|---|
| UnnecessaryImport | Unused import 'org.apache.commons.numbers.fraction.Fraction' | 4 | 13 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 40 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 40 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 47 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 47 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 50 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 50 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 59 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 59 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 67 |
| BigIntegerInstantiation | Don't create instances of already existing BigInteger and BigDecimal (ZERO, ONE, TEN) | 3 | 73 |