From 0f759bfff4cb160ef288efe12446a8f1adad1c65 Mon Sep 17 00:00:00 2001 From: Marvin Froeder Date: Mon, 7 Oct 2024 16:17:36 -0300 Subject: [PATCH] Formatted code using google code style for java --- .mvn/jvm.config | 13 + .../src/main/resources/stub.mustache | 2 +- pom.xml | 64 ++-- .../test/java/feign/soap/SOAPCodecTest.java | 2 +- .../test/java/feign/soap/SOAPCodecTest.java | 2 +- src/config/eclipse-java-style.xml | 332 ------------------ 6 files changed, 40 insertions(+), 375 deletions(-) delete mode 100644 src/config/eclipse-java-style.xml diff --git a/.mvn/jvm.config b/.mvn/jvm.config index c79df88790..cfbd68a5f5 100644 --- a/.mvn/jvm.config +++ b/.mvn/jvm.config @@ -1 +1,14 @@ +--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED +--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom diff --git a/apt-test-generator/src/main/resources/stub.mustache b/apt-test-generator/src/main/resources/stub.mustache index 015fbbad71..c5335954f3 100644 --- a/apt-test-generator/src/main/resources/stub.mustache +++ b/apt-test-generator/src/main/resources/stub.mustache @@ -1,7 +1,7 @@ package {{client.jpackage}}; -import java.util.concurrent.atomic.AtomicInteger; import feign.Experimental; +import java.util.concurrent.atomic.AtomicInteger; public class {{client.className}}Stub implements {{client.fullQualifiedName}} { diff --git a/pom.xml b/pom.xml index dc2ec79d59..39311445bd 100644 --- a/pom.xml +++ b/pom.xml @@ -177,6 +177,7 @@ 5.14.1 2.0.53 + 5.3 3.13.0 3.1.3 3.3.1 @@ -704,23 +705,33 @@ - com.marvinformatics.formatter - formatter-maven-plugin - 2.2.0 - - LF - ${main.basedir}/src/config/eclipse-java-style.xml - - travis/** - **/SAXDecoderTest.java - - + com.cosium.code + git-code-format-maven-plugin + ${git-code-format-maven-plugin.version} + + + + com.cosium.code + google-java-format + ${git-code-format-maven-plugin.version} + + + + install-formatter-hook - format + install-hooks + + false + + + + validate-code-format + + validate-code-format - validate @@ -882,33 +893,6 @@ - - validateCodeFormat - - - - - com.marvinformatics.formatter - formatter-maven-plugin - 2.2.0 - - LF - ${main.basedir}/src/config/eclipse-java-style.xml - - - - validate-only - - validate - - initialize - - - - - - - release diff --git a/soap-jakarta/src/test/java/feign/soap/SOAPCodecTest.java b/soap-jakarta/src/test/java/feign/soap/SOAPCodecTest.java index 4e19ee9860..e114feb3e8 100644 --- a/soap-jakarta/src/test/java/feign/soap/SOAPCodecTest.java +++ b/soap-jakarta/src/test/java/feign/soap/SOAPCodecTest.java @@ -448,7 +448,7 @@ void changeSoapProtocolAndSetHeader() { + (System.getProperty("java.version").startsWith("1.8") ? "" : "") + + " xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">") + "" + "test" + "test" diff --git a/soap/src/test/java/feign/soap/SOAPCodecTest.java b/soap/src/test/java/feign/soap/SOAPCodecTest.java index c6b3f4b645..34bef462f0 100644 --- a/soap/src/test/java/feign/soap/SOAPCodecTest.java +++ b/soap/src/test/java/feign/soap/SOAPCodecTest.java @@ -458,7 +458,7 @@ void changeSoapProtocolAndSetHeader() { + (System.getProperty("java.version").startsWith("1.8") ? "" : "") + + " xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">") + "" + "test" + "test" diff --git a/src/config/eclipse-java-style.xml b/src/config/eclipse-java-style.xml deleted file mode 100644 index 530817d4ce..0000000000 --- a/src/config/eclipse-java-style.xml +++ /dev/null @@ -1,332 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -