Skip to content

Commit ba59d40

Browse files
committed
chore: reformat files
1 parent ecdd1f9 commit ba59d40

18 files changed

+112
-22
lines changed

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 */

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@
2727
*/
2828
public class JsonType implements SQLType {
2929
public static final JsonType INSTANCE = new JsonType();
30+
3031
/**
3132
* Spanner does not have any type numbers, but the code values are unique. Add 100,000 to avoid
3233
* conflicts with the type numbers in java.sql.Types.
3334
*/
3435
public static final int VENDOR_TYPE_NUMBER = 100_000 + TypeCode.JSON_VALUE;
36+
3537
/**
3638
* Define a short type number as well, as this is what is expected to be returned in {@link
3739
* DatabaseMetaData#getTypeInfo()}.

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,14 @@
2222

2323
public class PgJsonbType implements SQLType {
2424
public static final PgJsonbType INSTANCE = new PgJsonbType();
25+
2526
/**
2627
* Spanner/Spangres does not have any type numbers, but the code values are unique. Add 200,000 to
2728
* avoid conflicts with the type numbers in java.sql.Types. Native Cloud Spanner types already use
2829
* the range starting at 100,000 (see {@link JsonType}).
2930
*/
3031
public static final int VENDOR_TYPE_NUMBER = 200_000 + TypeCode.JSON_VALUE;
32+
3133
/**
3234
* Define a short type number as well, as this is what is expected to be returned in {@link
3335
* DatabaseMetaData#getTypeInfo()}.

0 commit comments

Comments
 (0)