Skip to content

Commit d70cd35

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

File tree

3 files changed

+50
-2
lines changed

3 files changed

+50
-2
lines changed

pom.xml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1159,5 +1159,53 @@ under the License.</licenseText>
11591159
</plugins>
11601160
</build>
11611161
</profile>
1162+
<profile>
1163+
<id>rewrite</id>
1164+
<activation>
1165+
<activeByDefault>true</activeByDefault>
1166+
</activation>
1167+
<build>
1168+
<plugins>
1169+
<plugin>
1170+
<groupId>org.openrewrite.maven</groupId>
1171+
<artifactId>rewrite-maven-plugin</artifactId>
1172+
<version>6.8.0</version>
1173+
<configuration>
1174+
<exportDatatables>true</exportDatatables>
1175+
<activeRecipes>
1176+
<!-- https://github.com/apache/maven/pull/2307 -->
1177+
<!-- <recipe>org.openrewrite.java.testing.assertj.JUnitToAssertj</recipe> -->
1178+
<!-- <recipe>org.openrewrite.java.testing.assertj.SimplifyAssertJAssertion</recipe> -->
1179+
<!-- https://github.com/apache/maven/pull/2320 -->
1180+
<!-- <recipe>org.openrewrite.java.testing.junit5.JUnit5BestPractices</recipe> -->
1181+
<!-- <recipe>org.openrewrite.staticanalysis.CodeCleanup</recipe> -->
1182+
<!-- <recipe>org.openrewrite.staticanalysis.CommonStaticAnalysis</recipe> -->
1183+
<!-- <recipe>org.openrewrite.staticanalysis.RemoveUnusedLocalVariables</recipe> -->
1184+
<!-- https://github.com/apache/maven/pull/2317 -->
1185+
<!-- <recipe>org.openrewrite.staticanalysis.RemoveUnusedPrivateFields</recipe> -->
1186+
<!-- https://github.com/apache/maven/pull/2310 -->
1187+
<recipe>org.openrewrite.staticanalysis.RemoveUnusedPrivateMethods</recipe>
1188+
</activeRecipes>
1189+
</configuration>
1190+
<dependencies>
1191+
<dependency>
1192+
<groupId>org.openrewrite.recipe</groupId>
1193+
<artifactId>rewrite-static-analysis</artifactId>
1194+
<version>2.9.0</version>
1195+
</dependency>
1196+
</dependencies>
1197+
<executions>
1198+
<execution>
1199+
<id>rewrite-maven-plugin</id>
1200+
<goals>
1201+
<goal>run</goal>
1202+
</goals>
1203+
<phase>verify</phase>
1204+
</execution>
1205+
</executions>
1206+
</plugin>
1207+
</plugins>
1208+
</build>
1209+
</profile>
11621210
</profiles>
11631211
</project>

src/mdo/java/WrapperList.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ public T remove(int index) {
105105
}
106106
}
107107

108-
private Object writeReplace() throws ObjectStreamException {
108+
Object writeReplace() throws ObjectStreamException {
109109
return new ArrayList<T>(this);
110110
}
111111
}

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)