Skip to content

Commit 4acfc38

Browse files
committed
Polishing
Tweak license headers. Make codec class final/package-protected. Update docs. [#294][#298]
1 parent a44a65f commit 4acfc38

File tree

3 files changed

+8
-7
lines changed

3 files changed

+8
-7
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ This reference table shows the type mapping between [PostgreSQL][p] and Java dat
348348
| [`serial`][psql-serial-ref] | [**`Long`**][java-long-ref], [`Boolean`][java-boolean-ref], [`Byte`][java-byte-ref], [`Short`][java-short-ref], [`Integer`][java-integer-ref], [`BigDecimal`][java-bigdecimal-ref], [`BigInteger`][java-biginteger-ref]|
349349
| [`text`][psql-text-ref] | [**`String`**][java-string-ref], [`Clob`][r2dbc-clob-ref]|
350350
| [`time [without time zone]`][psql-time-ref] | [`LocalTime`][java-lt-ref]|
351-
| [`time [with time zone]`][psql-time-ref] | Not yet supported.|
351+
| [`time [with time zone]`][psql-time-ref] | [`OffsetTime`][java-ot-ref]|
352352
| [`timestamp [without time zone]`][psql-time-ref]|[**`LocalDateTime`**][java-ldt-ref], [`LocalTime`][java-lt-ref], [`LocalDate`][java-ld-ref], [`java.util.Date`][java-legacy-date-ref]|
353353
| [`timestamp [with time zone]`][psql-time-ref] | [**`OffsetDatetime`**][java-odt-ref], [`ZonedDateTime`][java-zdt-ref], [`Instant`][java-instant-ref]|
354354
| [`tsquery`][psql-tsquery-ref] | Not yet supported.|
@@ -428,6 +428,7 @@ Support for the following single-dimensional arrays (read and write):
428428
[java-lt-ref]: https://docs.oracle.com/javase/8/docs/api/java/time/LocalTime.html
429429
[java-legacy-date-ref]: https://docs.oracle.com/javase/8/docs/api/java/util/Date.html
430430
[java-odt-ref]: https://docs.oracle.com/javase/8/docs/api/java/time/OffsetDateTime.html
431+
[java-ot-ref]: https://docs.oracle.com/javase/8/docs/api/java/time/OffsetTime.html
431432
[java-primitive-ref]: https://docs.oracle.com/javase/tutorial/java/nutsandbolts/datatypes.html
432433
[java-short-ref]: https://docs.oracle.com/javase/8/docs/api/java/lang/Short.html
433434
[java-string-ref]: https://docs.oracle.com/javase/8/docs/api/java/lang/String.html

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2020 the original author or authors.
2+
* Copyright 2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -29,7 +29,7 @@
2929
import static io.r2dbc.postgresql.message.Format.FORMAT_TEXT;
3030
import static io.r2dbc.postgresql.type.PostgresqlObjectId.TIMETZ;
3131

32-
public class OffsetTimeCodec extends AbstractTemporalCodec<OffsetTime> {
32+
final class OffsetTimeCodec extends AbstractTemporalCodec<OffsetTime> {
3333

3434
private final ByteBufAllocator byteBufAllocator;
3535

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2017-2020 the original author or authors.
2+
* Copyright 2020 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -16,12 +16,12 @@
1616

1717
package io.r2dbc.postgresql.codec;
1818

19-
import java.time.OffsetTime;
20-
2119
import io.r2dbc.postgresql.client.Parameter;
2220
import io.r2dbc.postgresql.client.ParameterAssert;
2321
import org.junit.jupiter.api.Test;
2422

23+
import java.time.OffsetTime;
24+
2525
import static io.r2dbc.postgresql.client.Parameter.NULL_VALUE;
2626
import static io.r2dbc.postgresql.message.Format.FORMAT_BINARY;
2727
import static io.r2dbc.postgresql.message.Format.FORMAT_TEXT;
@@ -102,4 +102,4 @@ void encodeNull() {
102102
.isEqualTo(new Parameter(FORMAT_TEXT, TIMETZ.getObjectId(), NULL_VALUE));
103103
}
104104

105-
}
105+
}

0 commit comments

Comments
 (0)