This is an automated email from the ASF dual-hosted git repository.
ron pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 541d21d3e60 [FLINK-37665][core] Simplify DoubleMaximum#clone method
implementation (#26449)
541d21d3e60 is described below
commit 541d21d3e60ab6c3eee4e37576ce7b47b3e46def
Author: atu-sharm <[email protected]>
AuthorDate: Mon May 19 07:57:31 2025 +0530
[FLINK-37665][core] Simplify DoubleMaximum#clone method implementation
(#26449)
---
.../java/org/apache/flink/api/common/accumulators/DoubleMaximum.java | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git
a/flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleMaximum.java
b/flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleMaximum.java
index 6c1be03ce49..13e1f5a10cf 100644
---
a/flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleMaximum.java
+++
b/flink-core/src/main/java/org/apache/flink/api/common/accumulators/DoubleMaximum.java
@@ -61,9 +61,7 @@ public class DoubleMaximum implements
SimpleAccumulator<Double> {
@Override
public DoubleMaximum clone() {
- DoubleMaximum clone = new DoubleMaximum();
- clone.max = this.max;
- return clone;
+ return new DoubleMaximum(this.max);
}
// ------------------------------------------------------------------------