Skip to content

Commit 6a806a4

Browse files
committed
Polishing.
Reformat code. Add missing license headers. [pgjdbc#394][closes pgjdbc#403] Signed-off-by: Mark Paluch <[email protected]>
1 parent 4dc2be7 commit 6a806a4

21 files changed

+145
-15
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,4 +102,5 @@ public String toString() {
102102
", counter=" + this.counter +
103103
'}';
104104
}
105+
105106
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -203,4 +203,5 @@ private static List<PostgresqlColumnMetadata> getColumnMetadatas(Codecs codecs,
203203

204204
return columnMetadatas;
205205
}
206+
206207
}

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import io.netty.util.ReferenceCounted;
2222
import io.r2dbc.postgresql.message.Format;
2323
import io.r2dbc.postgresql.message.backend.BackendMessage;
24-
import io.r2dbc.postgresql.message.backend.CloseComplete;
2524
import io.r2dbc.postgresql.message.backend.CommandComplete;
2625
import io.r2dbc.postgresql.message.backend.ErrorResponse;
2726
import io.r2dbc.postgresql.message.backend.ParseComplete;

src/main/java/io/r2dbc/postgresql/codec/Box.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ public static Box of(Point a, Point b) {
5050
* @param bx the x axis coordinate of {@link Point point} b
5151
* @param by the y axis coordinate of {@link Point point} b
5252
* @return the new {@link Box} object
53+
* @since 0.9
5354
*/
5455
public static Box of(double ax, double ay, double bx, double by) {
5556
return new Box(Point.of(ax, ay), Point.of(bx, by));

src/main/java/io/r2dbc/postgresql/codec/ClobCodec.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,4 +77,5 @@ EncodedParameter doEncode(Clob value, PostgresTypeIdentifier dataType) {
7777
.then(Mono.empty()))
7878
);
7979
}
80+
8081
}

src/main/java/io/r2dbc/postgresql/codec/EnumCodec.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@ public EncodedParameter encodeNull() {
105105
return encodeNull(this.oid);
106106
}
107107

108-
109108
private EncodedParameter encodeNull(int dataType) {
110109
return new EncodedParameter(Format.FORMAT_BINARY, dataType, NULL_VALUE);
111110
}

src/main/java/io/r2dbc/postgresql/codec/LongCodec.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
final class LongCodec extends AbstractNumericCodec<Long> {
2929

30-
3130
LongCodec(ByteBufAllocator byteBufAllocator) {
3231
super(Long.class, byteBufAllocator);
3332
}

src/main/java/io/r2dbc/postgresql/codec/Lseg.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ public static Lseg of(Point p1, Point p2) {
4242
* @param p2x the x axis coordinate of {@link Point point} p2
4343
* @param p2y the y axis coordinate of {@link Point point} p2
4444
* @return the new {@link Lseg} object
45+
* @since 0.9
4546
*/
4647
public static Lseg of(double p1x, double p1y, double p2x, double p2y) {
4748
return new Lseg(Point.of(p1x, p1y), Point.of(p2x, p2y));

src/main/java/io/r2dbc/postgresql/codec/OffsetTimeCodec.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,4 @@ OffsetTime doDecode(ByteBuf buffer, PostgresTypeIdentifier dataType, Format form
3939
return decodeTemporal(buffer, dataType, format, OffsetTime.class, OffsetTime::from);
4040
}
4141

42-
4342
}

src/test/java/io/r2dbc/postgresql/BoundedStatementCacheUnitTests.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import io.r2dbc.postgresql.client.Binding;
2020
import io.r2dbc.postgresql.client.Client;
21-
import io.r2dbc.postgresql.client.EncodedParameter;
2221
import io.r2dbc.postgresql.client.TestClient;
2322
import io.r2dbc.postgresql.message.backend.CloseComplete;
2423
import io.r2dbc.postgresql.message.backend.ErrorResponse;

src/test/java/io/r2dbc/postgresql/CodecTextFormatIntegrationTests.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616

1717
package io.r2dbc.postgresql;
1818

19+
import io.r2dbc.postgresql.codec.DefaultCodecs;
20+
1921
/**
2022
* Integration tests for {@link DefaultCodecs} executed using text encoding.
2123
*/

src/test/java/io/r2dbc/postgresql/JsonIntegrationTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
/**
2727
* Integration tests for {@link Json}.
2828
*/
29-
final class JsonIntegrationTests extends AbstractIntegrationTests{
29+
final class JsonIntegrationTests extends AbstractIntegrationTests {
3030

3131
@Test
3232
void shouldReadAndWriteJson() {

src/test/java/io/r2dbc/postgresql/codec/AbstractArrayCodecUnitTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;

src/test/java/io/r2dbc/postgresql/codec/BoxArrayCodecUnitTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;

src/test/java/io/r2dbc/postgresql/codec/CircleArrayCodecUnitTests.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;
@@ -117,4 +133,4 @@ void decodeItem_textArray() {
117133
.isEqualTo(expected);
118134
}
119135

120-
}
136+
}

src/test/java/io/r2dbc/postgresql/codec/IntervalCodecUnitTests.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,19 @@ final class IntervalCodecUnitTests {
4444
@Test
4545
void constructorNoByteBufAllocator() {
4646
assertThatIllegalArgumentException().isThrownBy(() -> new IntervalCodec(null))
47-
.withMessage("byteBufAllocator must not be null");
47+
.withMessage("byteBufAllocator must not be null");
4848
}
4949

5050
@Test
5151
void doCanDecodeNoType() {
5252
assertThatIllegalArgumentException().isThrownBy(() -> new IntervalCodec(TEST).doCanDecode(null, FORMAT_TEXT))
53-
.withMessage("type must not be null");
53+
.withMessage("type must not be null");
5454
}
5555

5656
@Test
5757
void doCanDecodeNoFormat() {
5858
assertThatIllegalArgumentException().isThrownBy(() -> new IntervalCodec(TEST).doCanDecode(INTERVAL, null))
59-
.withMessage("format must not be null");
59+
.withMessage("format must not be null");
6060
}
6161

6262
@Test
@@ -75,13 +75,13 @@ void doDecode() {
7575
Interval interval = Interval.of(Period.of(20, 5, 8));
7676
ByteBuf intervalAsText = encode(TEST, "20 year 5 mon 8 day");
7777
IntervalAssert.assertThat(codec.doDecode(intervalAsText, INTERVAL, FORMAT_TEXT, Interval.class))
78-
.isEqualTo(interval);
78+
.isEqualTo(interval);
7979
}
8080

8181
@Test
8282
void doEncodeNoValue() {
8383
assertThatIllegalArgumentException().isThrownBy(() -> new IntervalCodec(TEST).doEncode(null))
84-
.withMessage("value must not be null");
84+
.withMessage("value must not be null");
8585
}
8686

8787
@Test
@@ -90,9 +90,9 @@ void doEncode() {
9090

9191
ByteBuf intervalAsText = encode(TEST, "10 years 5 mons 2 days 0 hours 0 mins 0.0 secs");
9292
ParameterAssert.assertThat(codec.doEncode(Interval.of(Period.of(10, 5, 2))))
93-
.hasFormat(FORMAT_TEXT)
94-
.hasType(INTERVAL.getObjectId())
95-
.hasValue(intervalAsText);
93+
.hasFormat(FORMAT_TEXT)
94+
.hasType(INTERVAL.getObjectId())
95+
.hasValue(intervalAsText);
9696

9797
intervalAsText = encode(TEST, "0 years 0 mons 23 days 23 hours 59 mins 3.35 secs");
9898
ParameterAssert.assertThat(codec.doEncode(Interval.of(Duration.ofSeconds(2073543, 350000000))))

src/test/java/io/r2dbc/postgresql/codec/LineArrayCodecUnitTest.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;

src/test/java/io/r2dbc/postgresql/codec/LsegArrayCodecUnitTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;

src/test/java/io/r2dbc/postgresql/codec/PathArrayCodecUnitTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;

src/test/java/io/r2dbc/postgresql/codec/PointArrayCodecUnitTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;

src/test/java/io/r2dbc/postgresql/codec/PolygonArrayCodecUnitTests.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright 2021 the original author or authors.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* https://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
package io.r2dbc.postgresql.codec;
218

319
import io.netty.buffer.ByteBuf;

0 commit comments

Comments
 (0)