Repository navigation
Conversation
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose of the pull request
Related: #1017
Adds a built-in converter for
java.time.OffsetTime, the last JDK 8java.timetype without one. On currentmaina POJO field of this type fails on read and write withCan not find 'Converter' support class OffsetTime.Scope follows the proposal posted in #1017 (string only, no objections raised in #1017): Excel NUMBER/DATE cells store a wall-clock time without an offset, so a numeric path would have to fabricate one.
What's changed?
converters/offsettime/OffsetTimeStringConverter, mirroringOffsetDateTimeStringConverter: default formatISO_OFFSET_TIME,@DateTimeFormatpatterns honored, locale-aware throughDateUtils.DateUtils.parseOffsetTime(...)/DateUtils.format(OffsetTime, ...)helpers, same shape as the existingOffsetDateTimeones. Empty/null format falls back toISO_OFFSET_TIME; text without an offset is rejected rather than defaulted.putAllConverter(read),putWriteConverter(XLSX/XLS write) andputWriteStringConverter(CSV). The proposal mentioned the first and third;putWriteConverteris also needed because a non-CSV write resolves the converter key without a cell type — the same registration used byUUIDStringConverterandInstantStringConverter.DateUtilshelper tests, and an XLSX/XLS/CSV round trip covering both the default ISO format and a@DateTimeFormatpattern.Verification
./mvnw spotless:checkpasses../mvnw clean package -Dmaven.test.skip=false -pl fesod-common,fesod-shaded,fesod-sheet: 1,895 tests, 0 failures../mvnw javadoc:javadocpasses.Can not find 'Converter' support class OffsetTime, and the registration test fails on a null converter.Checklist