You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "atu-sharm (via GitHub)" <gi...@apache.org> on 2025/04/13 09:14:35 UTC
[PR] [FLINK-37665]: Simplify DoubleMaximum.clone() Implementation [flink]
atu-sharm opened a new pull request, #26449:
URL: https://github.com/apache/flink/pull/26449
The current implementation of the clone() method in the DoubleMaximum class uses the default constructor and manually sets the max field:
{code:java}
// Some comments here
@Override
public DoubleMaximum clone() {
DoubleMaximum clone = new DoubleMaximum();
clone.max = this.max;
return clone;
}
{code}
This can be simplified by directly using the existing constructor DoubleMaximum(double value) to initialize the cloned object. The proposed change is:
{code:java}
@Override
public DoubleMaximum clone() {
return new DoubleMaximum(this.max);
}
{code}
Benefits of the Change:
Conciseness: The new implementation is shorter and avoids redundant code.
Encapsulation: It ensures the object is fully initialized in one step using the constructor.
Readability: The new implementation is easier to read and maintain.
This change improves the maintainability and clarity of the code without altering its functionality.
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37665]: Simplify DoubleMaximum.clone() Implementation [flink]
Posted by "lsyldliu (via GitHub)" <gi...@apache.org>.
lsyldliu merged PR #26449:
URL: https://github.com/apache/flink/pull/26449
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37665]: Simplify DoubleMaximum.clone() Implementation [flink]
Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #26449:
URL: https://github.com/apache/flink/pull/26449#issuecomment-2799875929
<!--
Meta data
{
"version" : 1,
"metaDataEntries" : [ {
"hash" : "f1fc9d39eed521a359dffeda826e6d64e606c727",
"status" : "UNKNOWN",
"url" : "TBD",
"triggerID" : "f1fc9d39eed521a359dffeda826e6d64e606c727",
"triggerType" : "PUSH"
} ]
}-->
## CI report:
* f1fc9d39eed521a359dffeda826e6d64e606c727 UNKNOWN
<details>
<summary>Bot commands</summary>
The @flinkbot bot supports the following commands:
- `@flinkbot run azure` re-run the last Azure build
</details>
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] [FLINK-37665]: Simplify DoubleMaximum.clone() Implementation [flink]
Posted by "adealjason (via GitHub)" <gi...@apache.org>.
adealjason commented on PR #26449:
URL: https://github.com/apache/flink/pull/26449#issuecomment-2799873733
稍后和您联系!
--
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.
To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org