Skip to content

Commit

Permalink
fix(core): collector host.uuid was filtering wrong values
Browse files Browse the repository at this point in the history
  • Loading branch information
tchiotludo committed Feb 11, 2022
1 parent 77e9367 commit 4fc47d7
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import oshi.software.os.OperatingSystem;

import java.lang.management.ManagementFactory;
import java.util.Objects;
import java.util.stream.Collectors;
import java.util.stream.Stream;

Expand Down Expand Up @@ -83,7 +84,8 @@ public static HostUsage of() {
processorIdentifier,
processorsCount
)
.filter(s -> s.equals("unknown"))
.filter(Objects::nonNull)
.filter(s -> !s.equals("unknown"))
.map(s -> String.format("%08x", s.hashCode()))
.collect(Collectors.joining("-"));

Expand Down

0 comments on commit 4fc47d7

Please sign in to comment.