Skip to content

Commit 68edb09

Browse files
author
Vincent Potucek
committed
[S1161] migrating rewrite and spotless to avoid missing @OverRide on overriding and implementing methods
1 parent 4e66327 commit 68edb09

File tree

110 files changed

+648
-1469
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+648
-1469
lines changed

.github/dependabot.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,8 @@ updates:
8686
- dependency-name: org.apache.maven.plugins:*
8787
- dependency-name: org.codehaus.mojo:*
8888
- dependency-name: io.fabric8:docker-maven-plugin
89-
- dependency-name: net.revelc.code.formatter:formatter-maven-plugin
90-
- dependency-name: net.revelc.code:impsort-maven-plugin
89+
- dependency-name: org.openrewrite.maven:rewrite-maven-plugin
90+
- dependency-name: com.diffplug.spotless:spotless-maven-plugin
9191
# Narayana
9292
- dependency-name: org.jboss.narayana.jta:*
9393
- dependency-name: org.jboss.narayana.jts:*

CONTRIBUTING.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -406,10 +406,6 @@ in `quarkus-parent` (root `pom.xml`).
406406

407407
When contributing to Quarkus, it is recommended to respect the following rules.
408408

409-
> **Note:** The `impsort-maven-plugin` uses the `.cache` directory on each module to speed up the build.
410-
> Because we have configured the plugin to store in a versioned directory, you may notice over time that the `.cache` directory grows in size. You can safely delete the `.cache` directory in each module to reclaim the space.
411-
> Running `./mvnw clean -Dclean-cache` automatically deletes that directory for you.
412-
413409
**Contributing to an extension**
414410

415411
When you contribute to an extension, after having applied your changes, run:

build-parent/pom.xml

Lines changed: 1 addition & 132 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@
632632
<ignoreSignaturesOfMissingClasses>true</ignoreSignaturesOfMissingClasses>
633633
<suppressAnnotations><annotation>**.SuppressForbidden</annotation></suppressAnnotations>
634634
</configuration>
635-
<phase>${forbiddenapis-maven-plugin.phase}</phase>
635+
<phase>${forbiddenapis.maven.plugin.phase}</phase>
636636
<goals>
637637
<goal>check</goal>
638638
</goals>
@@ -673,142 +673,11 @@
673673
<artifactId>smallrye-certificate-generator-maven-plugin</artifactId>
674674
<version>${smallrye-certificate-generator.version}</version>
675675
</plugin>
676-
<plugin>
677-
<groupId>com.diffplug.spotless</groupId>
678-
<artifactId>spotless-maven-plugin</artifactId>
679-
<version>2.44.4</version>
680-
</plugin>
681676
</plugins>
682677
</pluginManagement>
683678
</build>
684679

685680
<profiles>
686-
<profile>
687-
<id>format</id>
688-
<activation>
689-
<activeByDefault>true</activeByDefault>
690-
<property>
691-
<name>!no-format</name>
692-
</property>
693-
</activation>
694-
<build>
695-
<plugins>
696-
<plugin>
697-
<groupId>net.revelc.code.formatter</groupId>
698-
<artifactId>formatter-maven-plugin</artifactId>
699-
<executions>
700-
<execution>
701-
<phase>process-sources</phase>
702-
<goals>
703-
<goal>format</goal>
704-
</goals>
705-
</execution>
706-
</executions>
707-
</plugin>
708-
<plugin>
709-
<groupId>net.revelc.code</groupId>
710-
<artifactId>impsort-maven-plugin</artifactId>
711-
<configuration>
712-
<removeUnused>true</removeUnused>
713-
</configuration>
714-
<executions>
715-
<execution>
716-
<id>sort-imports</id>
717-
<goals>
718-
<goal>sort</goal>
719-
</goals>
720-
</execution>
721-
</executions>
722-
</plugin>
723-
</plugins>
724-
</build>
725-
</profile>
726-
<profile>
727-
<id>validate</id>
728-
<activation>
729-
<activeByDefault>true</activeByDefault>
730-
<property>
731-
<name>no-format</name>
732-
</property>
733-
</activation>
734-
<build>
735-
<plugins>
736-
<plugin>
737-
<groupId>net.revelc.code.formatter</groupId>
738-
<artifactId>formatter-maven-plugin</artifactId>
739-
<executions>
740-
<execution>
741-
<phase>process-sources</phase>
742-
<goals>
743-
<goal>validate</goal>
744-
</goals>
745-
</execution>
746-
</executions>
747-
</plugin>
748-
<plugin>
749-
<groupId>net.revelc.code</groupId>
750-
<artifactId>impsort-maven-plugin</artifactId>
751-
<configuration>
752-
<removeUnused>true</removeUnused>
753-
</configuration>
754-
<executions>
755-
<execution>
756-
<id>check-imports</id>
757-
<goals>
758-
<goal>check</goal>
759-
</goals>
760-
</execution>
761-
</executions>
762-
</plugin>
763-
</plugins>
764-
</build>
765-
</profile>
766-
767-
<profile>
768-
<id>format-kotlin</id>
769-
<activation>
770-
<activeByDefault>true</activeByDefault>
771-
<property>
772-
<name>!no-format</name>
773-
</property>
774-
<file>
775-
<exists>src/main/kotlin</exists>
776-
</file>
777-
</activation>
778-
<build>
779-
<plugins>
780-
<plugin>
781-
<groupId>com.diffplug.spotless</groupId>
782-
<artifactId>spotless-maven-plugin</artifactId>
783-
<executions>
784-
<execution>
785-
<id>format-kotlin</id>
786-
<phase>process-sources</phase>
787-
<goals>
788-
<goal>apply</goal>
789-
</goals>
790-
</execution>
791-
</executions>
792-
793-
<configuration>
794-
<kotlin>
795-
<ktfmt>
796-
<style>KOTLINLANG</style>
797-
<!-- optional, other options are DEFAULT, DROPBOX, GOOGLE and KOTLINLANG -->
798-
</ktfmt>
799-
800-
<!--
801-
<ktfmt>
802-
<style>DEFAULT</style> &lt;!&ndash; optional, other options are DEFAULT, DROPBOX, GOOGLE and KOTLINLANG &ndash;&gt;
803-
</ktfmt>
804-
-->
805-
806-
</kotlin>
807-
</configuration>
808-
</plugin>
809-
</plugins>
810-
</build>
811-
</profile>
812681
<profile>
813682
<id>dokka</id>
814683
<activation>

core/deployment/src/main/java/io/quarkus/deployment/QuarkusAugmentor.java

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,16 @@ public BuildResult run() throws Exception {
9797
long start = System.nanoTime();
9898
log.debug("Beginning Quarkus augmentation");
9999
ClassLoader originalClassLoader = Thread.currentThread().getContextClassLoader();
100-
QuarkusBuildCloseablesBuildItem buildCloseables = new QuarkusBuildCloseablesBuildItem();
101-
try {
100+
try (QuarkusBuildCloseablesBuildItem buildCloseables = new QuarkusBuildCloseablesBuildItem()) {
102101
Thread.currentThread().setContextClassLoader(deploymentClassLoader);
103102

104103
final BuildChainBuilder chainBuilder = BuildChain.builder();
105104
chainBuilder.setClassLoader(deploymentClassLoader);
106105

107106
ExtensionLoader.loadStepsFrom(deploymentClassLoader,
108-
buildSystemProperties == null ? new Properties() : buildSystemProperties,
109-
runtimeProperties == null ? new Properties() : runtimeProperties,
110-
effectiveModel, launchMode, devModeType)
107+
buildSystemProperties == null ? new Properties() : buildSystemProperties,
108+
runtimeProperties == null ? new Properties() : runtimeProperties,
109+
effectiveModel, launchMode, devModeType)
111110
.accept(chainBuilder);
112111

113112
Thread.currentThread().setContextClassLoader(classLoader);
@@ -184,7 +183,6 @@ public BuildResult run() throws Exception {
184183

185184
}
186185
Thread.currentThread().setContextClassLoader(originalClassLoader);
187-
buildCloseables.close();
188186
}
189187
}
190188

devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
package io.quarkus.maven;
22

33
import static io.quarkus.analytics.dto.segment.TrackEventType.DEV_MODE;
4-
import static io.quarkus.maven.QuarkusBootstrapMojo.CLOSE_BOOTSTRAPPED_APP_PARAM;
5-
import static io.quarkus.maven.QuarkusBootstrapMojo.MODE_PARAM;
64
import static io.smallrye.common.expression.Expression.Flag.LENIENT_SYNTAX;
75
import static io.smallrye.common.expression.Expression.Flag.NO_TRIM;
86
import static java.util.Collections.emptyMap;

devtools/maven/src/main/java/io/quarkus/maven/components/Prompter.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,10 @@ public void collectInput() throws IOException {
4848
return;
4949
}
5050
final TerminalConnection connection = new TerminalConnection();
51-
connection.setSignalHandler(interruptionSignalHandler());
52-
try {
51+
try (connection) {
52+
connection.setSignalHandler(interruptionSignalHandler());
5353
read(connection, ReadlineBuilder.builder().enableHistory(false).build(), prompts.iterator());
5454
connection.openBlocking();
55-
} finally {
56-
connection.close();
5755
}
5856
}
5957

extensions/grpc/deployment/src/test/java/io/quarkus/grpc/client/bd/ClientBlockingDeadlineTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package io.quarkus.grpc.client.bd;
22

3-
import static org.junit.jupiter.api.Assertions.assertEquals;
43
import static org.junit.jupiter.api.Assertions.assertNotNull;
54

65
import org.jboss.shrinkwrap.api.ShrinkWrap;

extensions/grpc/stubs/pom.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,10 @@
6969
</exclusion>
7070
</exclusions>
7171
</dependency>
72+
<dependency>
73+
<groupId>javax.annotation</groupId>
74+
<artifactId>javax.annotation-api</artifactId>
75+
</dependency>
7276
</dependencies>
7377

7478
<build>

extensions/hibernate-orm/runtime/src/main/java/io/quarkus/hibernate/orm/runtime/proxies/ProxyDefinitions.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import org.hibernate.internal.util.ReflectHelper;
1414
import org.hibernate.internal.util.collections.ArrayHelper;
1515
import org.hibernate.mapping.PersistentClass;
16-
import org.hibernate.proxy.pojo.ProxyFactoryHelper;
1716
import org.hibernate.proxy.pojo.bytebuddy.ByteBuddyProxyHelper;
1817
import org.jboss.logging.Logger;
1918

extensions/hibernate-reactive/deployment/src/test/java/io/quarkus/hibernate/reactive/mapping/id/optimizer/optimizer/AbstractIdOptimizerDefaultTest.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99
import org.assertj.core.api.AbstractObjectAssert;
1010
import org.assertj.core.api.InstanceOfAssertFactories;
11-
import org.hibernate.SessionFactory;
1211
import org.hibernate.id.OptimizableGenerator;
1312
import org.hibernate.id.enhanced.Optimizer;
1413
import org.hibernate.id.enhanced.PooledLoOptimizer;

0 commit comments

Comments
 (0)