Merge pull request #2400 from JokerQueue/master

ClusterNodesDecoder ignore unknown flag and avoid throwing exception, fix bug #2399
pull/2450/head
Nikita Koksharov 5 years ago committed by GitHub
commit 279cdd2e86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -56,7 +56,12 @@ public class ClusterNodesDecoder implements Decoder<List<ClusterNodeInfo>> {
String flags = params[2];
for (String flag : flags.split(",")) {
String flagValue = flag.toUpperCase().replaceAll("\\?", "");
node.addFlag(ClusterNodeInfo.Flag.valueOf(flagValue));
for (Flag nodeInfoFlag : ClusterNodeInfo.Flag.values()) {
if (nodeInfoFlag.name().equals(flagValue)) {
node.addFlag(nodeInfoFlag);
break;
}
}
}
if (!node.containsFlag(Flag.NOADDR)) {

Loading…
Cancel
Save