Core: Add java time version of rounding classes#32641
Core: Add java time version of rounding classes#32641spinscale merged 12 commits intoelastic:masterfrom
Conversation
|
Pinging @elastic/es-core-infra |
3f17d9b to
8851336
Compare
rjernst
left a comment
There was a problem hiding this comment.
This looks ok. It is difficult to review since it is mostly a copy of existing code. There are things I would like to have improved (eg adding java docs or not having the streams code be so indirect), but those are problems with the existing code. I reviewed the key methods using java 8 time apis as well as I could.
| /** | ||
| * A strategy for rounding long values. | ||
| */ | ||
| public abstract class Rounding implements Writeable { |
There was a problem hiding this comment.
Can we use a different class name and not put these into their own package? Once we drop joda time, we can rename these type of java time versions back to their original name. By using the same name, it makes opening a class by name in IntelliJ more difficult.
| import java.util.Objects; | ||
|
|
||
| /** | ||
| * A strategy for rounding long values. |
There was a problem hiding this comment.
Can you add a deprecation annotation to the joda based round class?
…e deleted when joda time gets removed
…e-types * elastic/master: (199 commits) Watcher: Remove unused hipchat render method (elastic#32211) Watcher: Remove extraneous auth classes (elastic#32300) Watcher: migrate PagerDuty v1 events API to v2 API (elastic#32285) [TEST] Select free port for Minio (elastic#32837) MINOR: Remove `IndexTemplateFilter` (elastic#32841) Core: Add java time version of rounding classes (elastic#32641) Aggregations/HL Rest client fix: missing scores (elastic#32774) HLRC: Add Delete License API (elastic#32586) INGEST: Create Index Before Pipeline Execute (elastic#32786) Fix NOOP bulk updates (elastic#32819) Remove client connections from TcpTransport (elastic#31886) Increase logging testRetentionPolicyChangeDuringRecovery AwaitsFix case-functions.sql-spec Mute security-cli tests in FIPS JVM (elastic#32812) SCRIPTING: Support BucketAggScript return null (elastic#32811) Unmute WildFly tests in FIPS JVM (elastic#32814) [TEST] Force a stop to save rollup state before continuing (elastic#32787) [test] disable packaging tests for suse boxes Mute IndicesRequestIT#testBulk [ML][DOCS] Refer to rules feature as custom rules (elastic#32785) ...
…listeners * elastic/master: Watcher: Remove unused hipchat render method (elastic#32211) Watcher: Remove extraneous auth classes (elastic#32300) Watcher: migrate PagerDuty v1 events API to v2 API (elastic#32285) [TEST] Select free port for Minio (elastic#32837) MINOR: Remove `IndexTemplateFilter` (elastic#32841) Core: Add java time version of rounding classes (elastic#32641) Aggregations/HL Rest client fix: missing scores (elastic#32774) HLRC: Add Delete License API (elastic#32586) INGEST: Create Index Before Pipeline Execute (elastic#32786) Fix NOOP bulk updates (elastic#32819) Remove client connections from TcpTransport (elastic#31886) Increase logging testRetentionPolicyChangeDuringRecovery AwaitsFix case-functions.sql-spec Mute security-cli tests in FIPS JVM (elastic#32812) SCRIPTING: Support BucketAggScript return null (elastic#32811) Unmute WildFly tests in FIPS JVM (elastic#32814) [TEST] Force a stop to save rollup state before continuing (elastic#32787) [test] disable packaging tests for suse boxes Mute IndicesRequestIT#testBulk [ML][DOCS] Refer to rules feature as custom rules (elastic#32785)
This commit adds a java time version of the existing rounding classes, which features the same test suite and a small test class to check if serialization works as expected.