> In `LocalDate::ofEpochDays` we validate the epoch day input, then we also > validate the year derived from that value. This second validation is > redundant since the minimum and maximum valid epoch day line up with the > first and last day of the minimum and maximum valid year, respectively. This > patch replace this redundant runtime validation with a test. > > This reduces code complexity (increasing chance for inlining to happen) and > removes a couple of branches from generated code.
Claes Redestad has updated the pull request incrementally with one additional commit since the last revision: Sparse out the range of offsets tested ------------- Changes: - all: https://git.openjdk.java.net/jdk/pull/8014/files - new: https://git.openjdk.java.net/jdk/pull/8014/files/6f82eb7d..44a11aa7 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=8014&range=01 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=8014&range=00-01 Stats: 8 lines in 1 file changed: 1 ins; 0 del; 7 mod Patch: https://git.openjdk.java.net/jdk/pull/8014.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/8014/head:pull/8014 PR: https://git.openjdk.java.net/jdk/pull/8014