Benoit Chatain Lacelle

Results 43 issues of Benoit Chatain Lacelle

This mirrors https://github.com/diffplug/spotless/pull/1578 , and in addition it applied the mutator to the whole repository through: mvn io.github.solven-eu.cleanthat:cleanthat-maven-plugin:apply -Dcleanthat.mutators=RSPEC-6212 ./gradlew spotlessApply (I relies on cleanthat mvn plugin not to have...

pr-archive

Reading https://github.com/diffplug/spotless/blob/main/PADDEDCELL.md, I may have some expectations regarding idempotency which may not be true (at least with the mvn plugin). I consider a configuration like the following: .gitignore *.md true...

enhancement

**Affects PMD Version:** 7.0.0-rc4 **Rule:** [UnnecessaryImport](https://docs.pmd-code.org/latest/pmd_rules_java_codestyle.html#unnecessaryimport) **Description:** I get multiple unexpected unused imports: ``` [INFO] --- maven-pmd-plugin:3.21.2:check (default-cli) @ sp-core --- [INFO] PMD version: 7.0.0-rc4 [INFO] PMD Failure: io.mitrust.sp.scope.ReportUnusuedImportFalsePositive:4 Rule:UnnecessaryImport...

a:false-positive

**Affects PMD Version:** 7.0.0-rc4 **Rule:** UnnecessaryCast **Description:** False-positive as we need to cast without diamond operator to compile. **Code Sample demonstrating the issue:** ```java public int compare(Comparable o1, Comparable o2)...

a:false-positive

**Affects PMD Version:** 7.0.0-rc4 **Rule:** UseDiamondOperator **Description:** False-positive as the types are mandatory for proper type inference. Else, `enriched` is inferred to be `Map` and `enriched.putAll(properties);` is not allowed. **Code...

a:false-positive

**Affects PMD Version:** 7.0.0-rc4 **Rule:** [UnusedPrivateMethod](https://docs.pmd-code.org/latest/pmd_rules_java_bestpractices.html#unusedprivatemethod) **Description:** False-positive as `notCachedGetAllDps` is used ``` [INFO] --- maven-pmd-plugin:3.21.2:check (default-cli) @ web-test --- [INFO] PMD version: 7.0.0-rc4 [INFO] PMD Failure: io.mitrust.backoffice.NotUsedPrivateMethodFalsePositive:15 Rule:UnusedPrivateMethod Priority:3...

a:false-positive

**Affects PMD Version:** 7.0.0-rc4 **Rule:** [ExceptionAsFlowControl](https://pmd.github.io/pmd/pmd_rules_java_design.html#exceptionasflowcontrol) **Description:** Given rules is a false-positive as the exception in the Lambda would typically not be caught in the outer `catch` block. **Code Sample...

a:false-positive

The following code produces a StackOverFLow: ``` import com.github.javaparser.ParserConfiguration; import com.github.javaparser.StaticJavaParser; import com.github.javaparser.ast.expr.Expression; import com.github.javaparser.ast.expr.MethodCallExpr; import com.github.javaparser.symbolsolver.JavaSymbolSolver; import com.github.javaparser.symbolsolver.resolution.typesolvers.ReflectionTypeSolver; public class StackOverFLowOnTypeResolution { static final String testCase = "package org.apache.logging.log4j.core.async;\n"...

Bug report
Symbol Solver

I consider `LexicalPreservingPrinter` while modifying the order of modifiers of a `ClassOrInterfaceDeclaration` the following piece of code: ``` package eu.solven.cleanthat.engine.java.refactorer.report_javaparser; import java.util.Collections; import java.util.Comparator; import java.util.List; import com.github.javaparser.StaticJavaParser; import com.github.javaparser.ast.Modifier;...

Bug report
Lexical Preservation
Workaround provided

Given: var typeSolver = new ReflectionTypeSolver(); SymbolReference symbolRef = typeSolver.tryToSolveType(int[].class.getName()); I would expect `symbolRef` to be solved. However it failed as `[I` is not in the `java.lang` package. I tried...

Improvement
Question (AST)