提交 ca9a078d 编写于 作者: J Juergen Hoeller

Polishing

上级 f1199623
/*
* Copyright 2002-2014 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -162,7 +162,7 @@ public class DestinationPatternsMessageCondition extends AbstractMessageConditio
}
List<String> matches = new ArrayList<String>();
for (String pattern : patterns) {
for (String pattern : this.patterns) {
if (pattern.equals(destination) || this.pathMatcher.match(pattern, destination)) {
matches.add(pattern);
}
......
......@@ -97,7 +97,7 @@ public class PayloadArgumentResolver implements HandlerMethodArgumentResolver {
if (ann == null || ann.required()) {
String paramName = getParameterName(parameter);
BindingResult bindingResult = new BeanPropertyBindingResult(payload, paramName);
bindingResult.addError(new ObjectError(paramName, "@Payload param is required"));
bindingResult.addError(new ObjectError(paramName, "Payload value must not be empty"));
throw new MethodArgumentNotValidException(message, parameter, bindingResult);
}
else {
......
......@@ -456,7 +456,7 @@ public abstract class AbstractMethodMessageHandler<T>
for (T mapping : mappingsToCheck) {
T match = getMatchingMapping(mapping, message);
if (match != null) {
matches.add(new Match(match, handlerMethods.get(mapping)));
matches.add(new Match(match, this.handlerMethods.get(mapping)));
}
}
}
......
/*
* Copyright 2002-2013 the original author or authors.
* Copyright 2002-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -57,7 +57,7 @@ public class SimpMessageTypeMessageCondition extends AbstractMessageCondition<Si
@Override
protected Collection<?> getContent() {
return Arrays.asList(messageType);
return Arrays.asList(this.messageType);
}
@Override
......@@ -72,12 +72,10 @@ public class SimpMessageTypeMessageCondition extends AbstractMessageCondition<Si
@Override
public SimpMessageTypeMessageCondition getMatchingCondition(Message<?> message) {
Object actualMessageType = SimpMessageHeaderAccessor.getMessageType(message.getHeaders());
if (actualMessageType == null) {
return null;
}
return this;
}
......@@ -97,4 +95,5 @@ public class SimpMessageTypeMessageCondition extends AbstractMessageCondition<Si
}
return 0;
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册