Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cluster-api/src/main/java/io/scalecube/cluster/Member.java
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ public void readExternal(ObjectInput in) throws IOException {
private static String stringifyId(String id) {
try {
final UUID uuid = UUID.fromString(id);
return Long.toHexString(uuid.getMostSignificantBits() & Long.MAX_VALUE);
return Long.toHexString(uuid.getMostSignificantBits());
} catch (Exception ex) {
return id;
}
Expand Down
16 changes: 16 additions & 0 deletions cluster/src/test/java/io/scalecube/cluster/MemberTest.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package io.scalecube.cluster;

import static org.junit.jupiter.api.Assertions.assertEquals;

import java.util.UUID;
import org.junit.jupiter.api.Test;

public class MemberTest {

@Test
public void testMemberString() {
UUID id = UUID.fromString("879162b5-0300-401a-9df3-18ca1f7df990");
Member member = new Member(id.toString(), "alias", "address", "namespace");
assertEquals("namespace:alias:879162b50300401a@address", member.toString());
}
}