diff --git a/check_api/pom.xml b/check_api/pom.xml
index 0824e406034..8a24c1a48fd 100644
--- a/check_api/pom.xml
+++ b/check_api/pom.xml
@@ -168,7 +168,7 @@
default-compile
- 11
+ 17
diff --git a/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java b/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java
index 621ae03f66e..08b32015615 100644
--- a/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java
+++ b/core/src/test/java/com/google/errorprone/bugpatterns/FinallyTest.java
@@ -55,15 +55,20 @@ public void lambda() {
compilationHelper
.addSourceLines(
"Test.java",
- "class Test {",
- " void f() {",
- " try {",
- " } catch (Throwable t) {",
- " } finally {",
- " Runnable r = () -> { return; };",
- " }",
- " }",
- "}")
+ """
+ class Test {
+ void f() {
+ try {
+ } catch (Throwable t) {
+ } finally {
+ Runnable r =
+ () -> {
+ return;
+ };
+ }
+ }
+ }
+ """)
.doTest();
}
}
diff --git a/pom.xml b/pom.xml
index 2181e204e5b..97697041501 100644
--- a/pom.xml
+++ b/pom.xml
@@ -182,8 +182,8 @@
maven-compiler-plugin
3.13.0
-
- 11
+
+ 17
--add-exports=java.base/jdk.internal.javac=ALL-UNNAMED
@@ -284,7 +284,7 @@
- 11
+ 17
24