Skip to content

Commit 440b45d

Browse files
committed
Reformat code
1 parent 9e85d3d commit 440b45d

File tree

98 files changed

+161
-64
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+161
-64
lines changed

intellij-style.xml

+22-18
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,30 @@
1-
<code_scheme name="Project" version="173">
2-
<option name="RIGHT_MARGIN" value="200" />
3-
<option name="FORMATTER_TAGS_ENABLED" value="true" />
4-
<option name="WRAP_COMMENTS" value="true" />
5-
<option name="SOFT_MARGINS" value="200" />
1+
<code_scheme name="R2DBC" version="173">
2+
<option name="RIGHT_MARGIN" value="200"/>
3+
<option name="FORMATTER_TAGS_ENABLED" value="true"/>
4+
<option name="SOFT_MARGINS" value="200"/>
65
<JavaCodeStyleSettings>
7-
<option name="CLASS_NAMES_IN_JAVADOC" value="3" />
8-
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
9-
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999" />
6+
<option name="CLASS_NAMES_IN_JAVADOC" value="3"/>
7+
<option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999"/>
8+
<option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="999"/>
109
</JavaCodeStyleSettings>
1110
<XML>
12-
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true" />
11+
<option name="XML_LEGACY_SETTINGS_IMPORTED" value="true"/>
1312
</XML>
1413
<codeStyleSettings language="JAVA">
15-
<option name="BLANK_LINES_BEFORE_PACKAGE" value="1" />
16-
<option name="BLANK_LINES_AROUND_FIELD" value="1" />
17-
<option name="BLANK_LINES_AROUND_FIELD_IN_INTERFACE" value="1" />
18-
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1" />
19-
<option name="BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER" value="1" />
20-
<option name="IF_BRACE_FORCE" value="3" />
21-
<option name="WRAP_LONG_LINES" value="true" />
14+
<option name="KEEP_BLANK_LINES_IN_DECLARATIONS" value="1"/>
15+
<option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>
16+
<option name="KEEP_BLANK_LINES_BETWEEN_PACKAGE_DECLARATION_AND_HEADER" value="1"/>
17+
<option name="KEEP_BLANK_LINES_BEFORE_RBRACE" value="1"/>
18+
<option name="BLANK_LINES_BEFORE_PACKAGE" value="1"/>
19+
<option name="BLANK_LINES_AROUND_FIELD" value="1"/>
20+
<option name="BLANK_LINES_AROUND_FIELD_IN_INTERFACE" value="1"/>
21+
<option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1"/>
22+
<option name="BLANK_LINES_AFTER_ANONYMOUS_CLASS_HEADER" value="1"/>
23+
<option name="BLANK_LINES_BEFORE_CLASS_END" value="1"/>
24+
<option name="IF_BRACE_FORCE" value="3"/>
25+
<option name="WRAP_LONG_LINES" value="true"/>
2226
<indentOptions>
23-
<option name="CONTINUATION_INDENT_SIZE" value="4" />
27+
<option name="CONTINUATION_INDENT_SIZE" value="4"/>
2428
</indentOptions>
2529
<arrangement>
2630
<rules>
@@ -446,4 +450,4 @@
446450
<codeStyleSettings language="TypeScript">
447451
<option name="WRAP_COMMENTS" value="true" />
448452
</codeStyleSettings>
449-
</code_scheme>
453+
</code_scheme>

src/jmh/java/io/r2dbc/postgresql/StagedResultSizeBenchmarks.java

+1
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ public void setup() {
8585
throw new RuntimeException(e);
8686
}
8787
}
88+
8889
}
8990

9091
@Benchmark

src/jmh/java/io/r2dbc/postgresql/StatementBenchmarks.java

+1
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ public ConnectionHolder() {
7676
throw new RuntimeException(e);
7777
}
7878
}
79+
7980
}
8081

8182
@Benchmark

src/main/java/io/r2dbc/postgresql/BoundedStatementCache.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ public Mono<String> getName(Binding binding, String sql) {
7979
.doOnNext(preparedName -> put(key, preparedName));
8080
}
8181

82-
8382
/**
8483
* Synchronized cache access: Return all statement names.
8584
*
@@ -195,5 +194,7 @@ public int hashCode() {
195194
result = 31 * result + Arrays.hashCode(this.parameterTypes);
196195
return result;
197196
}
197+
198198
}
199+
199200
}

src/main/java/io/r2dbc/postgresql/ConnectionContext.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ final class ConnectionContext {
3939

4040
private final PortalNameSupplier portalNameSupplier;
4141

42-
ConnectionContext(Client client, Codecs codecs, PostgresqlConnection connection, PostgresqlConnectionConfiguration configuration, PortalNameSupplier portalNameSupplier, StatementCache statementCache) {
42+
ConnectionContext(Client client, Codecs codecs, PostgresqlConnection connection, PostgresqlConnectionConfiguration configuration, PortalNameSupplier portalNameSupplier,
43+
StatementCache statementCache) {
4344
this.client = client;
4445
this.codecs = codecs;
4546
this.connection = connection;
@@ -83,4 +84,5 @@ public String toString() {
8384
", statementCache=" + this.statementCache +
8485
'}';
8586
}
87+
8688
}

src/main/java/io/r2dbc/postgresql/DisabledStatementCache.java

+1
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ public String toString() {
5151
"client=" + this.client +
5252
'}';
5353
}
54+
5455
}

src/main/java/io/r2dbc/postgresql/ExceptionFactory.java

+7
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,7 @@ static final class PostgresqlBadGrammarException extends R2dbcBadGrammarExceptio
129129
public ErrorDetails getErrorDetails() {
130130
return this.errorDetails;
131131
}
132+
132133
}
133134

134135
/**
@@ -147,6 +148,7 @@ static final class PostgresqlDataIntegrityViolationException extends R2dbcDataIn
147148
public ErrorDetails getErrorDetails() {
148149
return this.errorDetails;
149150
}
151+
150152
}
151153

152154
/**
@@ -165,6 +167,7 @@ static final class PostgresqlNonTransientResourceException extends R2dbcNonTrans
165167
public ErrorDetails getErrorDetails() {
166168
return this.errorDetails;
167169
}
170+
168171
}
169172

170173
/**
@@ -183,6 +186,7 @@ static final class PostgresqlPermissionDeniedException extends R2dbcPermissionDe
183186
public ErrorDetails getErrorDetails() {
184187
return this.errorDetails;
185188
}
189+
186190
}
187191

188192
/**
@@ -201,6 +205,7 @@ static final class PostgresqlRollbackException extends R2dbcRollbackException im
201205
public ErrorDetails getErrorDetails() {
202206
return this.errorDetails;
203207
}
208+
204209
}
205210

206211
/**
@@ -219,6 +224,7 @@ static final class PostgresqlTransientException extends R2dbcTransientException
219224
public ErrorDetails getErrorDetails() {
220225
return this.errorDetails;
221226
}
227+
222228
}
223229

224230
/**
@@ -237,6 +243,7 @@ static final class PostgresqlAuthenticationFailure extends R2dbcPermissionDenied
237243
public ErrorDetails getErrorDetails() {
238244
return this.errorDetails;
239245
}
246+
240247
}
241248

242249
}

src/main/java/io/r2dbc/postgresql/ExtendedQueryPostgresqlStatement.java

+1
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ private Binding getCurrent() {
241241

242242
return this.current;
243243
}
244+
244245
}
245246

246247
}

src/main/java/io/r2dbc/postgresql/Extensions.java

+1
Original file line numberDiff line numberDiff line change
@@ -111,4 +111,5 @@ Extensions mergeWith(Extensions other) {
111111
public int size() {
112112
return this.extensions.size();
113113
}
114+
114115
}

src/main/java/io/r2dbc/postgresql/IndefiniteStatementCache.java

+1
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,5 @@ private Mono<String> parse(String sql, int[] types) {
9494
.then(Mono.just(name))
9595
.cache();
9696
}
97+
9798
}

src/main/java/io/r2dbc/postgresql/KeepAliveMessage.java

+1
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,5 @@ public ByteBuf encode(ByteBufAllocator allocator) {
6868

6969
return out;
7070
}
71+
7172
}

src/main/java/io/r2dbc/postgresql/NotificationResponseWrapper.java

+1
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,5 @@ public String toString() {
5353
"parameter=" + getParameter() +
5454
'}';
5555
}
56+
5657
}

src/main/java/io/r2dbc/postgresql/OptionMapper.java

+4-1
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,7 @@ public interface Source<T> {
160160
* @param consumer the runnable that should be invoked.
161161
*/
162162
Otherwise to(Runnable consumer);
163+
163164
}
164165

165166
public interface Otherwise {
@@ -170,6 +171,7 @@ public interface Otherwise {
170171
* @param consumer the runnable that should be invoked.
171172
*/
172173
void otherwise(Runnable consumer);
174+
173175
}
174176

175177
private enum Otherwises implements Otherwise {
@@ -187,7 +189,6 @@ public void otherwise(Runnable consumer) {
187189
}
188190
}
189191

190-
191192
@SuppressWarnings({"unchecked", "rawtypes"})
192193
private enum NullSource implements Source<Object> {
193194

@@ -267,5 +268,7 @@ public Otherwise to(Consumer<T> consumer) {
267268
public Otherwise to(Runnable consumer) {
268269
return to(ignore -> consumer.run());
269270
}
271+
270272
}
273+
271274
}

src/main/java/io/r2dbc/postgresql/PostgresqlConnection.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ final class PostgresqlConnection implements io.r2dbc.postgresql.api.PostgresqlCo
7171

7272
private volatile IsolationLevel isolationLevel;
7373

74-
PostgresqlConnection(Client client, Codecs codecs, PortalNameSupplier portalNameSupplier, StatementCache statementCache, IsolationLevel isolationLevel, PostgresqlConnectionConfiguration configuration) {
74+
PostgresqlConnection(Client client, Codecs codecs, PortalNameSupplier portalNameSupplier, StatementCache statementCache, IsolationLevel isolationLevel,
75+
PostgresqlConnectionConfiguration configuration) {
7576
this.context = new ConnectionContext(client, codecs, this, configuration, portalNameSupplier, statementCache);
7677
this.client = Assert.requireNonNull(client, "client must not be null");
7778
this.codecs = Assert.requireNonNull(codecs, "codecs must not be null");
@@ -418,6 +419,7 @@ public void onComplete() {
418419
Flux<Notification> getEvents() {
419420
return this.processor;
420421
}
422+
421423
}
422424

423425
}

src/main/java/io/r2dbc/postgresql/PostgresqlConnectionConfiguration.java

+3
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,7 @@ private Supplier<SslProvider> createSslProvider() {
770770
.defaultConfiguration(TCP)
771771
.build();
772772
}
773+
773774
}
774775

775776
static class FixedFetchSize implements ToIntFunction<String> {
@@ -789,5 +790,7 @@ public int applyAsInt(String value) {
789790
public String toString() {
790791
return "" + this.fetchSize;
791792
}
793+
792794
}
795+
793796
}

src/main/java/io/r2dbc/postgresql/PostgresqlConnectionFactory.java

+1
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,7 @@ static class PostgresConnectionException extends R2dbcNonTransientResourceExcept
270270
public PostgresConnectionException(String msg, @Nullable Throwable cause) {
271271
super(msg, cause);
272272
}
273+
273274
}
274275

275276
}

src/main/java/io/r2dbc/postgresql/PostgresqlConnectionFactoryMetadata.java

+1
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,5 @@ private PostgresqlConnectionFactoryMetadata() {
3737
public String getName() {
3838
return NAME;
3939
}
40+
4041
}

src/main/java/io/r2dbc/postgresql/PostgresqlConnectionFactoryProvider.java

+1
Original file line numberDiff line numberDiff line change
@@ -267,4 +267,5 @@ private static Map<String, String> convertToMap(Object options) {
267267

268268
return result;
269269
}
270+
270271
}

src/main/java/io/r2dbc/postgresql/PostgresqlRow.java

+1
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ public String toString() {
217217
", context=" + this.context +
218218
'}';
219219
}
220+
220221
}
221222

222223
}

src/main/java/io/r2dbc/postgresql/PostgresqlRowMetadata.java

-1
Original file line numberDiff line numberDiff line change
@@ -135,5 +135,4 @@ private Collection<String> getColumnNames(List<PostgresqlColumnMetadata> columnM
135135
return columnNames;
136136
}
137137

138-
139138
}

src/main/java/io/r2dbc/postgresql/StatementCache.java

+1
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,5 @@ static StatementCache fromPreparedStatementCacheQueries(Client client, int prepa
3333
}
3434
return new BoundedStatementCache(client, preparedStatementCacheQueries);
3535
}
36+
3637
}

src/main/java/io/r2dbc/postgresql/api/ErrorDetails.java

-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ public final class ErrorDetails {
8888

8989
private final String where;
9090

91-
9291
/**
9392
* Create new {@link ErrorDetails} from {@link List} of {@link Field fields}.
9493
*

src/main/java/io/r2dbc/postgresql/api/PostgresqlResult.java

+1
Original file line numberDiff line numberDiff line change
@@ -40,4 +40,5 @@ public interface PostgresqlResult extends Result {
4040
*/
4141
@Override
4242
<T> Flux<T> map(BiFunction<Row, RowMetadata, ? extends T> mappingFunction);
43+
4344
}

src/main/java/io/r2dbc/postgresql/authentication/SASLAuthenticationHandler.java

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ public SASLAuthenticationHandler(CharSequence password, String username) {
4242
this.username = Assert.requireNonNull(username, "username must not be null");
4343
}
4444

45-
4645
/**
4746
* Returns whether this {@link AuthenticationHandler} can support authentication for a given authentication message response.
4847
*

src/main/java/io/r2dbc/postgresql/client/Binding.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
* A collection of {@link Parameter}s for a single bind invocation of an {@link ExtendedQueryMessageFlow}.
3434
*/
3535
public final class Binding {
36+
3637
public static final Binding EMPTY = new Binding(0);
3738

3839
private static final Parameter UNSPECIFIED = new Parameter(Format.FORMAT_BINARY, -1, Mono.never());
@@ -181,7 +182,6 @@ private <T> List<T> getTransformedParameters(Function<Parameter, T> transformer)
181182
transformed = new ArrayList<>(this.parameters.size());
182183
}
183184

184-
185185
transformed.add(transformer.apply(parameter));
186186
}
187187

src/main/java/io/r2dbc/postgresql/client/ConnectionSettings.java

+1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ public Builder sslConfig(SSLConfig sslConfig) {
195195
this.sslConfig = Assert.requireNonNull(sslConfig, "sslConfig must not be null");
196196
return this;
197197
}
198+
198199
}
199200

200201
}

src/main/java/io/r2dbc/postgresql/client/ExtendedQueryMessageFlow.java

+1
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,5 @@ private static Collection<Format> resultFormat(boolean forceBinary) {
231231
return Collections.emptyList();
232232
}
233233
}
234+
234235
}

src/main/java/io/r2dbc/postgresql/client/QueryLogger.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,5 @@ final class QueryLogger {
2929
static void logQuery(String query) {
3030
QUERY_LOGGER.debug("Executing query: {}", query);
3131
}
32+
3233
}

0 commit comments

Comments
 (0)