Skip to content

Commit

Permalink
Upgrade JavaParser to fix regression reported in #807
Browse files Browse the repository at this point in the history
  • Loading branch information
blacelle committed Apr 20, 2024
1 parent 7458202 commit 8c8bc0a
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
2 changes: 1 addition & 1 deletion java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<!-- JavaParser seems a better option to later handle more languages -->
<groupId>com.github.javaparser</groupId>
<artifactId>javaparser-symbol-solver-core</artifactId>
<version>3.25.9</version>
<version>3.25.10</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@
import eu.solven.cleanthat.engine.java.refactorer.helpers.ResolvedTypeHelpers;

/**
* Turns 'int i = 10;' into 'var i = 10'
* Turns 'int i = 10;' into 'var i = 10'.
*
* PMD7.0 introduced `UseExplicitTypes`, which recommend not activating this mutator.
* (https://github.com/pmd/pmd/issues/2847)
*
* @author Benoit Lacelle
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
package eu.solven.cleanthat.engine.java.refactorer.cases.do_not_format_me;

import eu.solven.cleanthat.engine.java.refactorer.annotations.CompareCompilationUnitsAsStrings;
import eu.solven.cleanthat.engine.java.refactorer.annotations.CompareInnerAnnotations;
import eu.solven.cleanthat.engine.java.refactorer.annotations.CompareInnerClasses;
import eu.solven.cleanthat.engine.java.refactorer.annotations.UnmodifiedInnerClass;
import eu.solven.cleanthat.engine.java.refactorer.meta.IJavaparserAstMutator;
import eu.solven.cleanthat.engine.java.refactorer.mutators.UnnecessaryModifier;
import eu.solven.cleanthat.engine.java.refactorer.test.AJavaparserRefactorerCases;
Expand Down Expand Up @@ -121,4 +121,17 @@ static void test3() {
void test4();
}
}

// https://github.com/solven-eu/cleanthat/issues/807
@UnmodifiedInnerClass
public static class InterfacePrivateMethod {
public interface Pre {
private void privateMethod() {
}

default void callingPrivateMethod() {
privateMethod();
}
}
}
}

0 comments on commit 8c8bc0a

Please sign in to comment.