Flaugh24 commented on code in PR #1632:
URL: https://github.com/apache/ignite-3/pull/1632#discussion_r1098465826


##########
modules/api/src/main/java/org/apache/ignite/network/NodeMetadata.java:
##########
@@ -28,35 +28,54 @@ public class NodeMetadata implements Serializable {
 
     private final String restHost;
 
-    private final int restPort;
+    private final int httpPort;
 
-    public NodeMetadata(String restHost, int restPort) {
+    private final int httpsPort;
+
+    /** Constructor. */
+    public NodeMetadata(String restHost, int httpPort, int httpsPort) {
         this.restHost = restHost;
-        this.restPort = restPort;
+        this.httpPort = httpPort;
+        this.httpsPort = httpsPort;
     }
 
     public String restHost() {
         return restHost;
     }
 
-    public int restPort() {
-        return restPort;
+    public int httpPort() {
+        return httpPort;
+    }
+
+    public int httpsPort() {
+        return httpsPort;
     }
 
     @Override
     public boolean equals(Object o) {
         if (this == o) {
             return true;
         }
-        if (!(o instanceof NodeMetadata)) {
+        if (o == null || getClass() != o.getClass()) {
             return false;
         }
+
         NodeMetadata that = (NodeMetadata) o;
-        return restPort == that.restPort && Objects.equals(restHost, 
that.restHost);
+
+        if (httpPort != that.httpPort) {
+            return false;
+        }
+        if (httpsPort != that.httpsPort) {
+            return false;
+        }
+        return restHost != null ? restHost.equals(that.restHost) : 
that.restHost == null;
     }
 
     @Override
     public int hashCode() {
-        return Objects.hash(restHost, restPort);
+        int result = restHost != null ? restHost.hashCode() : 0;
+        result = 31 * result + httpPort;
+        result = 31 * result + httpsPort;
+        return result;

Review Comment:
   just generated by IDEA



-- 
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]

Reply via email to