update 简化 stream 代码写法 (java 16) xx.collect(Collectors.toList()) => xx.toList() ;

update 简化 instanceof 代码写法 (java 12) 直接在后面定义变量 ;
update 简化 switch 代码写法 (java 12) ;
This commit is contained in:
zlyx
2023-01-19 20:03:26 +08:00
parent afbc78b672
commit 57da2e33a6
11 changed files with 18 additions and 27 deletions

View File

@ -438,7 +438,7 @@ public class RedisUtils {
*/
public static Collection<String> keys(final String pattern) {
Stream<String> stream = CLIENT.getKeys().getKeysStreamByPattern(pattern);
return stream.collect(Collectors.toList());
return stream.toList();
}
/**