package org.ethereum.net.rlpx;

import org.ethereum.net.client.Capability;
import org.ethereum.net.p2p.HelloMessage;
import org.ethereum.util.CollectionUtils;

import java.util.List;

import static org.ethereum.net.message.StaticMessages.HELLO_MESSAGE;

/**
 * @author Mikhail Kalinin
 * @since 14.07.2015
 */
public class HandshakeHelper {

    public static List<Capability> getSupportedCapabilities(HelloMessage hello) {
        return CollectionUtils.selectList(hello.getCapabilities(), new CollectionUtils.Predicate<Capability>() {
            @Override
            public boolean evaluate(Capability cap) {
                return HELLO_MESSAGE.getCapabilities().contains(cap);
            }
        });
    }

}

@@ -181,78 +181,8 @@
 t;%0A%0A
-import static org.ethereum.net.message.StaticMessages.HELLO_MESSAGE;%0A%0A
 /**%0A
@@ -343,24 +343,104 @@
 ge hello) %7B%0A
+        final List%3CCapability%3E configCaps = Capability.getConfigCapabilities();%0A
         retu
@@ -643,39 +643,18 @@
 urn 
-HELLO_MESSAGE.getCapabilities()
+configCaps
 .con

Fix incorrect merge