abashev commented on code in PR #12735:
URL: https://github.com/apache/ignite/pull/12735#discussion_r2804952218
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java:
##########
@@ -82,7 +75,7 @@ public GridDeploymentInfoBean(
this.clsLdrId = clsLdrId;
this.depMode = depMode;
this.userVer = userVer;
- this.participants = participants;
+ this.participants = Map.copyOf(participants);
Review Comment:
It is best practice for all transport protocols if you send some object from
one JVM to another then need to keep it immutable as much as possible. And this
one is a protection from modifying internal map and also break down a
connection with original map. Up to you, if you are fine without it then I'll
remove it.
##########
modules/core/src/main/java/org/apache/ignite/internal/managers/deployment/GridDeploymentInfoBean.java:
##########
@@ -92,7 +85,7 @@ public GridDeploymentInfoBean(GridDeploymentInfo dep) {
clsLdrId = dep.classLoaderId();
depMode = dep.deployMode();
userVer = dep.userVersion();
- participants = dep.participants();
+ participants = Map.copyOf(dep.participants());
Review Comment:
⬆️
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]