Skip to content

Commit 9101253

Browse files
author
Vincent Potucek
committed
rewrite-maven-plugin: Remove unused private methods
1 parent 6019307 commit 9101253

File tree

3 files changed

+40
-3
lines changed

3 files changed

+40
-3
lines changed

pom.xml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,44 @@ under the License.</licenseText>
799799
</plugins>
800800
</pluginManagement>
801801
<plugins>
802+
<plugin>
803+
<groupId>org.openrewrite.maven</groupId>
804+
<artifactId>rewrite-maven-plugin</artifactId>
805+
<version>6.8.0</version>
806+
<configuration>
807+
<exportDatatables>true</exportDatatables>
808+
<activeRecipes>
809+
<!-- https://github.com/apache/maven/pull/2307 -->
810+
<!-- <recipe>org.openrewrite.java.testing.assertj.JUnitToAssertj</recipe> -->
811+
<!-- <recipe>org.openrewrite.java.testing.assertj.SimplifyAssertJAssertion</recipe> -->
812+
<!-- https://github.com/apache/maven/pull/2320 -->
813+
<!-- <recipe>org.openrewrite.java.testing.junit5.JUnit5BestPractices</recipe> -->
814+
<!-- <recipe>org.openrewrite.staticanalysis.CodeCleanup</recipe> -->
815+
<!-- <recipe>org.openrewrite.staticanalysis.CommonStaticAnalysis</recipe> -->
816+
<!-- <recipe>org.openrewrite.staticanalysis.RemoveUnusedLocalVariables</recipe> -->
817+
<!-- https://github.com/apache/maven/pull/2317 -->
818+
<!-- <recipe>org.openrewrite.staticanalysis.RemoveUnusedPrivateFields</recipe> -->
819+
<!-- https://github.com/apache/maven/pull/2310 -->
820+
<recipe>org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods</recipe>
821+
</activeRecipes>
822+
</configuration>
823+
<dependencies>
824+
<dependency>
825+
<groupId>org.openrewrite.recipe</groupId>
826+
<artifactId>rewrite-static-analysis</artifactId>
827+
<version>2.9.0</version>
828+
</dependency>
829+
</dependencies>
830+
<executions>
831+
<execution>
832+
<id>rewrite-maven-plugin</id>
833+
<goals>
834+
<goal>run</goal>
835+
</goals>
836+
<phase>verify</phase>
837+
</execution>
838+
</executions>
839+
</plugin>
802840
<plugin>
803841
<groupId>io.github.olamy.maven.plugins</groupId>
804842
<artifactId>jacoco-aggregator-maven-plugin</artifactId>

src/mdo/java/WrapperList.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
*/
1919
package ${package};
2020

21-
import java.io.ObjectStreamException;
2221
import java.io.Serializable;
2322
import java.util.AbstractList;
2423
import java.util.ArrayList;
@@ -105,7 +104,7 @@ public T remove(int index) {
105104
}
106105
}
107106

108-
private Object writeReplace() throws ObjectStreamException {
107+
Object writeReplace() throws ObjectStreamException {
109108
return new ArrayList<T>(this);
110109
}
111110
}

src/mdo/java/WrapperProperties.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public void storeToXML(OutputStream os, String comment, String encoding) throws
372372
}
373373

374374

375-
private Object writeReplace() throws java.io.ObjectStreamException {
375+
Object writeReplace() throws java.io.ObjectStreamException {
376376
Properties props = new Properties();
377377
props.putAll(getter.get());
378378
return props;

0 commit comments

Comments
 (0)