Skip to content

Commit faa0580

Browse files
fix: specify google-java-format 1.7 for Java 11 compatibility
- Update build.gradle to use google-java-format version 1.7 - This resolves the Spotless Java formatting IllegalAccessError with Java 11 - Version 1.7 works with Java 11 without requiring JVM module arguments - Includes Spotless auto-formatting fixes for Util.java and DefaultJwtServiceTest.java Co-Authored-By: Sam Fertig <sam.fertig@codeium.com>
1 parent 9fffe6d commit faa0580

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ spotless {
1616
include '**/*.java'
1717
exclude 'build/generated/**/*.*', 'build/generated-examples/**/*.*'
1818
}
19-
googleJavaFormat()
19+
googleJavaFormat('1.7')
2020
}
2121
}
2222

src/main/java/io/spring/Util.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ public class Util {
44
public static boolean isEmpty(String value) {
55
return value == null || value.isEmpty();
66
}
7-
7+
88
public static boolean isValidEmail(String email) {
99
return email != null && email.contains("@");
1010
}
11-
11+
1212
public static boolean isValidPhone(String phone) {
1313
return phone != null && phone.length() == 10;
1414
}

src/test/java/io/spring/infrastructure/service/DefaultJwtServiceTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ public class DefaultJwtServiceTest {
1313

1414
@BeforeEach
1515
public void setUp() {
16-
jwtService = new DefaultJwtService("123123123123123123123123123123123123123123123123123123123123", 3600);
16+
jwtService =
17+
new DefaultJwtService("123123123123123123123123123123123123123123123123123123123123", 3600);
1718
}
1819

1920
@Test

0 commit comments

Comments
 (0)