Skip to content

Commit 1a0fc9f

Browse files
committed
Cleanup
1 parent 7c4d0ae commit 1a0fc9f

File tree

2 files changed

+2
-15
lines changed

2 files changed

+2
-15
lines changed

services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/ConnectionSetup.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
import java.util.Map.Entry;
1212
import java.util.Objects;
1313
import java.util.StringJoiner;
14-
import java.util.stream.Collectors;
1514

1615
public final class ConnectionSetup implements Externalizable {
1716

@@ -49,15 +48,10 @@ public boolean hasCredentials() {
4948
@Override
5049
public String toString() {
5150
return new StringJoiner(", ", ConnectionSetup.class.getSimpleName() + "[", "]")
52-
.add("credentials=" + mask(credentials))
51+
.add("credentials=" + MaskUtil.mask(credentials))
5352
.toString();
5453
}
5554

56-
private static Map<String, String> mask(Map<String, String> creds) {
57-
return creds.entrySet().stream()
58-
.collect(Collectors.toMap(Entry::getKey, entry -> MaskUtil.mask(entry.getValue())));
59-
}
60-
6155
@Override
6256
public void writeExternal(ObjectOutput out) throws IOException {
6357
// credentials

services-transport-parent/services-transport-rsocket/src/main/java/io/scalecube/services/transport/rsocket/RSocketClientTransport.java

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
import java.util.Collection;
2525
import java.util.Collections;
2626
import java.util.Map;
27-
import java.util.Map.Entry;
2827
import java.util.concurrent.ConcurrentHashMap;
29-
import java.util.stream.Collectors;
3028
import org.slf4j.Logger;
3129
import org.slf4j.LoggerFactory;
3230
import reactor.core.publisher.Mono;
@@ -94,7 +92,7 @@ private Mono<Map<String, String>> getCredentials(ServiceReference serviceReferen
9492
creds ->
9593
LOGGER.debug(
9694
"[credentialsSupplier] Got credentials ({}) for service: {}",
97-
mask(creds),
95+
MaskUtil.mask(creds),
9896
serviceReference))
9997
.doOnError(
10098
ex ->
@@ -138,11 +136,6 @@ private Mono<RSocket> connect(
138136
"[rsocket][client][{}] Failed to connect, cause: {}", address, th.toString()));
139137
}
140138

141-
private static Map<String, String> mask(Map<String, String> creds) {
142-
return creds.entrySet().stream()
143-
.collect(Collectors.toMap(Entry::getKey, entry -> MaskUtil.mask(entry.getValue())));
144-
}
145-
146139
private Payload encodeConnectionSetup(ConnectionSetup connectionSetup) {
147140
ByteBuf byteBuf = ByteBufAllocator.DEFAULT.buffer();
148141
try {

0 commit comments

Comments
 (0)