Skip to content

Commit ca9a078

Browse files
committed
Polishing
1 parent f119962 commit ca9a078

File tree

4 files changed

+7
-8
lines changed

4 files changed

+7
-8
lines changed

spring-messaging/src/main/java/org/springframework/messaging/handler/DestinationPatternsMessageCondition.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2014 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -162,7 +162,7 @@ public DestinationPatternsMessageCondition getMatchingCondition(Message<?> messa
162162
}
163163

164164
List<String> matches = new ArrayList<String>();
165-
for (String pattern : patterns) {
165+
for (String pattern : this.patterns) {
166166
if (pattern.equals(destination) || this.pathMatcher.match(pattern, destination)) {
167167
matches.add(pattern);
168168
}

spring-messaging/src/main/java/org/springframework/messaging/handler/annotation/support/PayloadArgumentResolver.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public Object resolveArgument(MethodParameter parameter, Message<?> message) thr
9797
if (ann == null || ann.required()) {
9898
String paramName = getParameterName(parameter);
9999
BindingResult bindingResult = new BeanPropertyBindingResult(payload, paramName);
100-
bindingResult.addError(new ObjectError(paramName, "@Payload param is required"));
100+
bindingResult.addError(new ObjectError(paramName, "Payload value must not be empty"));
101101
throw new MethodArgumentNotValidException(message, parameter, bindingResult);
102102
}
103103
else {

spring-messaging/src/main/java/org/springframework/messaging/handler/invocation/AbstractMethodMessageHandler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ private void addMatchesToCollection(Collection<T> mappingsToCheck, Message<?> me
456456
for (T mapping : mappingsToCheck) {
457457
T match = getMatchingMapping(mapping, message);
458458
if (match != null) {
459-
matches.add(new Match(match, handlerMethods.get(mapping)));
459+
matches.add(new Match(match, this.handlerMethods.get(mapping)));
460460
}
461461
}
462462
}

spring-messaging/src/main/java/org/springframework/messaging/simp/SimpMessageTypeMessageCondition.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2013 the original author or authors.
2+
* Copyright 2002-2015 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -57,7 +57,7 @@ public SimpMessageType getMessageType() {
5757

5858
@Override
5959
protected Collection<?> getContent() {
60-
return Arrays.asList(messageType);
60+
return Arrays.asList(this.messageType);
6161
}
6262

6363
@Override
@@ -72,12 +72,10 @@ public SimpMessageTypeMessageCondition combine(SimpMessageTypeMessageCondition o
7272

7373
@Override
7474
public SimpMessageTypeMessageCondition getMatchingCondition(Message<?> message) {
75-
7675
Object actualMessageType = SimpMessageHeaderAccessor.getMessageType(message.getHeaders());
7776
if (actualMessageType == null) {
7877
return null;
7978
}
80-
8179
return this;
8280
}
8381

@@ -97,4 +95,5 @@ else if (actualMessageType.equals(other.getMessageType())) {
9795
}
9896
return 0;
9997
}
98+
10099
}

0 commit comments

Comments
 (0)