Anonymous type can be replaced with lambda
This commit is contained in:
committed by
Josh Cummings
parent
05f42a4995
commit
fb39d9c255
+4
-6
@@ -36,12 +36,10 @@ import java.util.Map;
|
||||
* @author Rob Winch
|
||||
*/
|
||||
public final class SimpDestinationMessageMatcher implements MessageMatcher<Object> {
|
||||
public static final MessageMatcher<Object> NULL_DESTINATION_MATCHER = new MessageMatcher<Object>() {
|
||||
public boolean matches(Message<? extends Object> message) {
|
||||
String destination = SimpMessageHeaderAccessor.getDestination(message
|
||||
.getHeaders());
|
||||
return destination == null;
|
||||
}
|
||||
public static final MessageMatcher<Object> NULL_DESTINATION_MATCHER = message -> {
|
||||
String destination = SimpMessageHeaderAccessor.getDestination(message
|
||||
.getHeaders());
|
||||
return destination == null;
|
||||
};
|
||||
|
||||
private final PathMatcher matcher;
|
||||
|
||||
Reference in New Issue
Block a user