Skip to content

Commit 8b27da5

Browse files
committed
Formatted code using google code style for java
1 parent 19a6131 commit 8b27da5

File tree

5 files changed

+39
-374
lines changed

5 files changed

+39
-374
lines changed

.mvn/jvm.config

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,14 @@
1+
--add-opens jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
2+
--add-opens jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
3+
--add-opens jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
4+
--add-opens jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED
5+
--add-opens jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
6+
--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
7+
--add-opens jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
8+
--add-opens jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
9+
--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
10+
--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
11+
--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
12+
--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
13+
--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
114
-XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom

pom.xml

Lines changed: 24 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,7 @@
177177
<mockito.version>5.14.1</mockito.version>
178178
<fastjson2.version>2.0.53</fastjson2.version>
179179

180+
<git-code-format-maven-plugin.version>5.3</git-code-format-maven-plugin.version>
180181
<maven-compiler-plugin.version>3.13.0</maven-compiler-plugin.version>
181182
<maven-install-plugin.version>3.1.3</maven-install-plugin.version>
182183
<maven-source-plugin.version>3.3.1</maven-source-plugin.version>
@@ -704,23 +705,33 @@
704705
</executions>
705706
</plugin>
706707
<plugin>
707-
<groupId>com.marvinformatics.formatter</groupId>
708-
<artifactId>formatter-maven-plugin</artifactId>
709-
<version>2.2.0</version>
710-
<configuration>
711-
<lineEnding>LF</lineEnding>
712-
<configFile>${main.basedir}/src/config/eclipse-java-style.xml</configFile>
713-
<excludes>
714-
<exclude>travis/**</exclude>
715-
<exclude>**/SAXDecoderTest.java</exclude>
716-
</excludes>
717-
</configuration>
708+
<groupId>com.cosium.code</groupId>
709+
<artifactId>git-code-format-maven-plugin</artifactId>
710+
<version>${git-code-format-maven-plugin.version}</version>
711+
<dependencies>
712+
<!-- Enable https://github.com/google/google-java-format -->
713+
<dependency>
714+
<groupId>com.cosium.code</groupId>
715+
<artifactId>google-java-format</artifactId>
716+
<version>${git-code-format-maven-plugin.version}</version>
717+
</dependency>
718+
</dependencies>
718719
<executions>
720+
<!-- On commit, format the modified files -->
719721
<execution>
722+
<id>install-formatter-hook</id>
720723
<goals>
721-
<goal>format</goal>
724+
<goal>install-hooks</goal>
725+
</goals>
726+
<inherited>false</inherited>
727+
</execution>
728+
<!-- On Maven verify phase, fail if any file (including unmodified) is
729+
badly formatted -->
730+
<execution>
731+
<id>validate-code-format</id>
732+
<goals>
733+
<goal>validate-code-format</goal>
722734
</goals>
723-
<phase>validate</phase>
724735
</execution>
725736
</executions>
726737
</plugin>
@@ -882,33 +893,6 @@
882893
</properties>
883894
</profile>
884895

885-
<profile>
886-
<id>validateCodeFormat</id>
887-
888-
<build>
889-
<plugins>
890-
<plugin>
891-
<groupId>com.marvinformatics.formatter</groupId>
892-
<artifactId>formatter-maven-plugin</artifactId>
893-
<version>2.2.0</version>
894-
<configuration>
895-
<lineEnding>LF</lineEnding>
896-
<configFile>${main.basedir}/src/config/eclipse-java-style.xml</configFile>
897-
</configuration>
898-
<executions>
899-
<execution>
900-
<id>validate-only</id>
901-
<goals>
902-
<goal>validate</goal>
903-
</goals>
904-
<phase>initialize</phase>
905-
</execution>
906-
</executions>
907-
</plugin>
908-
</plugins>
909-
</build>
910-
</profile>
911-
912896
<profile>
913897
<id>release</id>
914898
<build>

soap-jakarta/src/test/java/feign/soap/SOAPCodecTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ void changeSoapProtocolAndSetHeader() {
448448
+ (System.getProperty("java.version").startsWith("1.8")
449449
? "<wss:Security xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">"
450450
: "<wss:Security xmlns=\"http://schemas.xmlsoap.org/ws/2002/12/secext\""
451-
+ " xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">")
451+
+ " xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">")
452452
+ "<wss:UsernameToken>"
453453
+ "<wss:Username>test</wss:Username>"
454454
+ "<wss:Password>test</wss:Password>"

soap/src/test/java/feign/soap/SOAPCodecTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,7 +458,7 @@ void changeSoapProtocolAndSetHeader() {
458458
+ (System.getProperty("java.version").startsWith("1.8")
459459
? "<wss:Security xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">"
460460
: "<wss:Security xmlns=\"http://schemas.xmlsoap.org/ws/2002/12/secext\""
461-
+ " xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">")
461+
+ " xmlns:wss=\"http://schemas.xmlsoap.org/ws/2002/12/secext\">")
462462
+ "<wss:UsernameToken>"
463463
+ "<wss:Username>test</wss:Username>"
464464
+ "<wss:Password>test</wss:Password>"

0 commit comments

Comments
 (0)