Skip to content

Commit b77eae6

Browse files
committed
Fixed Member.toString
1 parent b2c8944 commit b77eae6

File tree

1 file changed

+4
-3
lines changed
  • cluster-api/src/main/java/io/scalecube/cluster

1 file changed

+4
-3
lines changed

cluster-api/src/main/java/io/scalecube/cluster/Member.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
import java.io.IOException;
77
import java.io.ObjectInput;
88
import java.io.ObjectOutput;
9-
import java.nio.file.Paths;
109
import java.util.Objects;
10+
import java.util.StringJoiner;
1111

1212
/**
1313
* Cluster member which represents node in the cluster and contains its id and address. This class
@@ -134,10 +134,11 @@ public void readExternal(ObjectInput in) throws IOException {
134134

135135
@Override
136136
public String toString() {
137+
StringJoiner stringJoiner = new StringJoiner("/", "", "");
137138
if (alias == null) {
138-
return Paths.get(namespace, id + "@" + address).toString();
139+
return stringJoiner.add(namespace).add(id + "@" + address).toString();
139140
} else {
140-
return Paths.get(namespace, alias, id + "@" + address).toString();
141+
return stringJoiner.add(namespace).add(alias).add(id + "@" + address).toString();
141142
}
142143
}
143144
}

0 commit comments

Comments
 (0)