leventov commented on a change in pull request #8129: Spotbugs:
NP_NONNULL_PARAM_VIOLATION
URL: https://github.com/apache/incubator-druid/pull/8129#discussion_r308831929
##########
File path:
extensions-core/datasketches/src/main/java/org/apache/druid/query/aggregation/datasketches/theta/SketchEstimatePostAggregator.java
##########
@@ -67,17 +70,10 @@ public Comparator getComparator()
if (errorBoundsStdDev == null) {
return Ordering.natural();
} else {
- return new Comparator()
- {
- @Override
- public int compare(Object o1, Object o2)
- {
- return Doubles.compare(
- ((SketchEstimateWithErrorBounds) o1).getEstimate(),
- ((SketchEstimateWithErrorBounds) o2).getEstimate()
- );
- }
- };
+ return (o1, o2) -> Doubles.compare(
Review comment:
It's `Comparator.comparingDouble(SketchEstimateWithErrorBounds::getEstimate)`
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]