@@ -43,7 +43,8 @@ public int getVersion() {
43
43
private final Map <String , Integer > modules ;
44
44
private final Map <String , CommandInfo > commands ;
45
45
46
- private RedisConditions (RedisVersion version , Map < String , CommandInfo > commands , Map <String , Integer > modules ) {
46
+ private RedisConditions (RedisVersion version , Map <String , CommandInfo > commands ,
47
+ Map <String , Integer > modules ) {
47
48
this .version = version ;
48
49
this .commands = commands ;
49
50
this .modules = modules ;
@@ -52,15 +53,14 @@ private RedisConditions(RedisVersion version, Map< String, CommandInfo> commands
52
53
public static RedisConditions of (UnifiedJedis jedis ) {
53
54
RedisVersion version = RedisVersionUtil .getRedisVersion (jedis );
54
55
55
- CommandObject <Map <String , CommandInfo >> commandInfoCmd
56
- = new CommandObject <>( new CommandArguments (COMMAND ), CommandInfo .COMMAND_INFO_RESPONSE );
56
+ CommandObject <Map <String , CommandInfo >> commandInfoCmd = new CommandObject <>(
57
+ new CommandArguments (COMMAND ), CommandInfo .COMMAND_INFO_RESPONSE );
57
58
Map <String , CommandInfo > commands = jedis .executeCommand (commandInfoCmd );
58
59
59
- CommandObject <List <Module >> moduleListCmd
60
- = new CommandObject <>( new CommandArguments (MODULE ).add (LIST ), MODULE_LIST );
60
+ CommandObject <List <Module >> moduleListCmd = new CommandObject <>(
61
+ new CommandArguments (MODULE ).add (LIST ), MODULE_LIST );
61
62
62
- Map <String , Integer > modules = jedis .executeCommand (moduleListCmd )
63
- .stream ()
63
+ Map <String , Integer > modules = jedis .executeCommand (moduleListCmd ).stream ()
64
64
.collect (Collectors .toMap ((m ) -> m .getName ().toUpperCase (), Module ::getVersion ));
65
65
66
66
return new RedisConditions (version , commands , modules );
@@ -101,6 +101,8 @@ public boolean moduleVersionIsGreaterThanOrEqual(String module, int version) {
101
101
* @return {@code true} if the module version is greater than or equal to the specified version.
102
102
*/
103
103
public boolean moduleVersionIsGreaterThanOrEqual (ModuleVersion moduleVersion ) {
104
- return moduleVersionIsGreaterThanOrEqual (moduleVersion .getModuleName (), moduleVersion .getVersion ());
104
+ return moduleVersionIsGreaterThanOrEqual (moduleVersion .getModuleName (),
105
+ moduleVersion .getVersion ());
105
106
}
107
+
106
108
}
0 commit comments