Skip to content

Commit 8ea3ade

Browse files
renovate-botenocom
andauthored
deps: Update dependency com.google.errorprone:error_prone_core to v2.41.0 (#612)
- Move errorprone to Java 17 and higher builds - Use new argument for stopping build on warning - Fix various problems identified by new errorprone version Co-authored-by: Eno Compton <[email protected]>
1 parent 0b4a8c5 commit 8ea3ade

File tree

6 files changed

+10
-6
lines changed

6 files changed

+10
-6
lines changed

alloydb-jdbc-connector/src/main/java/com/google/cloud/alloydb/ConnectionConfig.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,9 +115,8 @@ private static void validateProperties(Properties props) {
115115
final String instanceNameStr = props.getProperty(ALLOYDB_INSTANCE_NAME, "");
116116
Preconditions.checkArgument(
117117
InstanceName.isParsableFrom(instanceNameStr),
118-
String.format(
119-
"'%s' must have format: projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>/instances/<INSTANCE>",
120-
ALLOYDB_INSTANCE_NAME));
118+
"'%s' must have format: projects/<PROJECT>/locations/<REGION>/clusters/<CLUSTER>/instances/<INSTANCE>",
119+
ALLOYDB_INSTANCE_NAME);
121120
}
122121

123122
private ConnectionConfig(

alloydb-jdbc-connector/src/main/java/com/google/cloud/alloydb/RefreshCalculator.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ class RefreshCalculator {
2929
// time to complete.
3030
static final Duration DEFAULT_REFRESH_BUFFER = Duration.ofMinutes(4);
3131

32+
@SuppressWarnings("JavaDurationGetSecondsToToSeconds")
3233
long calculateSecondsUntilNextRefresh(Instant now, Instant expiration) {
3334
Duration timeUntilExp = Duration.between(now, expiration);
3435

alloydb-jdbc-connector/src/test/java/com/google/cloud/alloydb/LazyConnectionInfoCacheTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
import org.bouncycastle.operator.OperatorCreationException;
3030
import org.junit.Test;
3131

32+
@SuppressWarnings("TimeInStaticInitializer")
3233
public class LazyConnectionInfoCacheTest {
3334

3435
private static final Instant ONE_HOUR_AGO =

alloydb-jdbc-connector/src/test/java/com/google/cloud/alloydb/RefreshAheadConnectionInfoCacheTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
import org.junit.Before;
3838
import org.junit.Test;
3939

40+
@SuppressWarnings("TimeInStaticInitializer")
4041
public class RefreshAheadConnectionInfoCacheTest {
4142

4243
private static final String TEST_INSTANCE_IP = "10.0.0.1";

alloydb-jdbc-connector/src/test/java/com/google/cloud/alloydb/RefreshCalculatorTest.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import org.junit.runners.Parameterized.Parameters;
2929

3030
@RunWith(Parameterized.class)
31+
@SuppressWarnings("TimeInStaticInitializer")
3132
public class RefreshCalculatorTest {
3233

3334
private final Duration input;

pom.xml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
<github.global.server>github</github.global.server>
6060
<site.installationModule>alloydb-connector-parent</site.installationModule>
6161
<project.javadoc.protobufBaseURL>https://googleapis.dev/java/google-api-grpc/latest</project.javadoc.protobufBaseURL>
62-
<error-prone.version>2.31.0</error-prone.version>
62+
<error-prone.version>2.41.0</error-prone.version>
6363
<error-prone-annotations.version>2.41.0</error-prone-annotations.version>
6464
<bouncycastle.version>1.81</bouncycastle.version>
6565
</properties>
@@ -179,9 +179,9 @@
179179

180180
<profiles>
181181
<profile>
182-
<id>java9</id>
182+
<id>java17</id>
183183
<activation>
184-
<jdk>[9,)</jdk>
184+
<jdk>[17,)</jdk>
185185
</activation>
186186
<build>
187187
<plugins>
@@ -194,6 +194,7 @@
194194
<fork>true</fork>
195195
<compilerArgs>
196196
<arg>-XDcompilePolicy=simple</arg>
197+
<arg>--should-stop=ifError=FLOW</arg>
197198
<arg>-Xplugin:ErrorProne</arg>
198199
<arg>-Xlint:-options</arg>
199200
<arg>-J--add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED</arg>

0 commit comments

Comments
 (0)