mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-08 16:57:09 +08:00
refactor: 优化部分代码
修复 Sonar 扫描问题
This commit is contained in:
@@ -24,7 +24,6 @@ import top.charles7c.continew.starter.core.constant.StringConstants;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.Collection;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
@@ -138,7 +137,7 @@ public class RedisUtils {
|
||||
*/
|
||||
public static Collection<String> keys(final String keyPattern) {
|
||||
Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(getNameMapper().map(keyPattern));
|
||||
return stream.map(key -> getNameMapper().unmap(key)).collect(Collectors.toList());
|
||||
return stream.map(key -> getNameMapper().unmap(key)).toList();
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user