Skip to content

Commit 1a95dab

Browse files
chore: update linter groupd ID to the latest (#2052)
* chore: update linter groupd ID to the latest Follows from googleapis/java-shared-config#1003 * chore: update jvm to 17 in lint job * chore: reformat files
1 parent ca803cc commit 1a95dab

20 files changed

+114
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ jobs:
104104
- uses: actions/setup-java@v4
105105
with:
106106
distribution: temurin
107-
java-version: 11
107+
java-version: 17
108108
- run: java -version
109109
- run: .kokoro/build.sh
110110
env:

.kokoro/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ test)
6262
RETURN_CODE=$?
6363
;;
6464
lint)
65-
mvn com.coveo:fmt-maven-plugin:check -B -ntp
65+
mvn com.spotify.fmt:fmt-maven-plugin:check -B -ntp
6666
RETURN_CODE=$?
6767
;;
6868
javadoc)

src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcPreparedStatement.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ public void addBatch(String sql) throws SQLException {
8181
@Override
8282
public void setNull(int parameterIndex, int sqlType) throws SQLException {
8383
checkClosed();
84-
parameters.setParameter(
85-
parameterIndex, /* value = */ null, sqlType, /* scaleOrLength = */ null);
84+
parameters.setParameter(parameterIndex, /* value= */ null, sqlType, /* scaleOrLength= */ null);
8685
}
8786

8887
@Override

src/main/java/com/google/cloud/spanner/jdbc/AbstractJdbcResultSet.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939
abstract class AbstractJdbcResultSet extends AbstractJdbcWrapper implements ResultSet {
4040
/** The underlying Cloud Spanner {@link com.google.cloud.spanner.ResultSet}. */
4141
final com.google.cloud.spanner.ResultSet spanner;
42+
4243
/** Current fetch size hint for this result set. */
4344
private int fetchSize;
4445

src/main/java/com/google/cloud/spanner/jdbc/CloudSpannerJdbcConnection.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ default void setTransactionTag(String tag) throws SQLException {
8888
throw new UnsupportedOperationException();
8989
}
9090

91-
/** @return The transaction tag of the current transaction. */
91+
/**
92+
* @return The transaction tag of the current transaction.
93+
*/
9294
default String getTransactionTag() throws SQLException {
9395
throw new UnsupportedOperationException();
9496
}
@@ -242,7 +244,9 @@ default String getStatementTag() throws SQLException {
242244
*/
243245
void setReturnCommitStats(boolean returnCommitStats) throws SQLException;
244246

245-
/** @return true if this connection requests commit statistics from Cloud Spanner. */
247+
/**
248+
* @return true if this connection requests commit statistics from Cloud Spanner.
249+
*/
246250
boolean isReturnCommitStats() throws SQLException;
247251

248252
/**
@@ -359,7 +363,9 @@ default String getStatementTag() throws SQLException {
359363
*/
360364
String getConnectionUrl();
361365

362-
/** @return The {@link Dialect} that is used by this connection. */
366+
/**
367+
* @return The {@link Dialect} that is used by this connection.
368+
*/
363369
default Dialect getDialect() {
364370
return Dialect.GOOGLE_STANDARD_SQL;
365371
}

src/main/java/com/google/cloud/spanner/jdbc/IsolationLevelConverter.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ static IsolationLevel convertToSpanner(int jdbcIsolationLevel) throws SQLExcepti
4040

4141
static int convertToJdbc(IsolationLevel isolationLevel) {
4242
switch (isolationLevel) {
43-
// Translate UNSPECIFIED to SERIALIZABLE as that is the default isolation level.
43+
// Translate UNSPECIFIED to SERIALIZABLE as that is the default isolation level.
4444
case ISOLATION_LEVEL_UNSPECIFIED:
4545
case SERIALIZABLE:
4646
return Connection.TRANSACTION_SERIALIZABLE;

src/main/java/com/google/cloud/spanner/jdbc/JdbcConstants.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ public final class JdbcConstants {
2727
* was executed with {@link Statement#execute(String)} returned a {@link ResultSet}.
2828
*/
2929
public static final int STATEMENT_RESULT_SET = -1;
30+
3031
/**
3132
* Special value that is used to indicate that a statement had no result. The method {@link
3233
* Statement#getUpdateCount()} will return this value if the previous statement that was executed

src/main/java/com/google/cloud/spanner/jdbc/JdbcDataSource.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,16 @@ public boolean isClosed() {
114114
return false;
115115
}
116116

117-
/** @return the JDBC URL to use for this {@link DataSource}. */
117+
/**
118+
* @return the JDBC URL to use for this {@link DataSource}.
119+
*/
118120
public String getUrl() {
119121
return url;
120122
}
121123

122-
/** @param url The JDBC URL to use for this {@link DataSource}. */
124+
/**
125+
* @param url The JDBC URL to use for this {@link DataSource}.
126+
*/
123127
public void setUrl(String url) {
124128
this.url = url;
125129
}

src/main/java/com/google/cloud/spanner/jdbc/JdbcDriver.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,9 @@ static void deregister() throws SQLException {
196196
registeredDriver = null;
197197
}
198198

199-
/** @return {@code true} if the driver is registered against {@link DriverManager} */
199+
/**
200+
* @return {@code true} if the driver is registered against {@link DriverManager}
201+
*/
200202
static boolean isRegistered() {
201203
return registeredDriver != null;
202204
}
@@ -281,7 +283,7 @@ static boolean isHibernate() {
281283
// we assume that Hibernate will (eventually) be used.
282284
Class.forName(
283285
"com.google.cloud.spanner.hibernate.SpannerDialect",
284-
/*initialize=*/ false,
286+
/* initialize= */ false,
285287
JdbcDriver.class.getClassLoader());
286288
return true;
287289
} catch (Throwable ignore) {

src/main/java/com/google/cloud/spanner/jdbc/JdbcSqlException.java

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,19 @@
2525
*/
2626
public interface JdbcSqlException {
2727

28-
/** @see Throwable#getMessage() */
28+
/**
29+
* @see Throwable#getMessage()
30+
*/
2931
String getMessage();
3032

31-
/** @see Throwable#getCause() */
33+
/**
34+
* @see Throwable#getCause()
35+
*/
3236
Throwable getCause();
3337

34-
/** @see SQLException#getSQLState() */
38+
/**
39+
* @see SQLException#getSQLState()
40+
*/
3541
String getSQLState();
3642

3743
/** Returns the gRPC error code as an int */

0 commit comments

Comments
 (0)