Fix spelling error in constant name

This commit is contained in:
Oleg Zhurakousky
2021-02-22 14:11:27 +01:00
parent 3821e5745c
commit 71c0d6d71e
2 changed files with 4 additions and 4 deletions

View File

@@ -76,7 +76,7 @@ import org.springframework.web.util.pattern.PathPatternRouteMatcher;
*/ */
class FunctionRSocketMessageHandler extends RSocketMessageHandler { class FunctionRSocketMessageHandler extends RSocketMessageHandler {
public static final String RECONSILED_LOOKUP_DESTINATION_HEADER = "reconsiledLookupDestination"; public static final String RECONCILED_LOOKUP_DESTINATION_HEADER = "reconciledLookupDestination";
private final FunctionCatalog functionCatalog; private final FunctionCatalog functionCatalog;
@@ -137,7 +137,7 @@ class FunctionRSocketMessageHandler extends RSocketMessageHandler {
@Override @Override
protected RouteMatcher.Route getDestination(Message<?> message) { protected RouteMatcher.Route getDestination(Message<?> message) {
RouteMatcher.Route reconsiledDestination = (RouteMatcher.Route) message.getHeaders().get(RECONSILED_LOOKUP_DESTINATION_HEADER); RouteMatcher.Route reconsiledDestination = (RouteMatcher.Route) message.getHeaders().get(RECONCILED_LOOKUP_DESTINATION_HEADER);
return reconsiledDestination == null ? super.getDestination(message) : reconsiledDestination; return reconsiledDestination == null ? super.getDestination(message) : reconsiledDestination;
} }
@@ -206,7 +206,7 @@ class FunctionRSocketMessageHandler extends RSocketMessageHandler {
Map<String, Object> headersMap = (Map<String, Object>) ReflectionUtils Map<String, Object> headersMap = (Map<String, Object>) ReflectionUtils
.getField(this.headersField, message.getHeaders()); .getField(this.headersField, message.getHeaders());
PathPatternRouteMatcher matcher = new PathPatternRouteMatcher(); PathPatternRouteMatcher matcher = new PathPatternRouteMatcher();
headersMap.put(RECONSILED_LOOKUP_DESTINATION_HEADER, matcher.parseRoute(destination)); headersMap.put(RECONCILED_LOOKUP_DESTINATION_HEADER, matcher.parseRoute(destination));
} }
protected static final class MessageHandlerMethodArgumentResolver implements SyncHandlerMethodArgumentResolver { protected static final class MessageHandlerMethodArgumentResolver implements SyncHandlerMethodArgumentResolver {

View File

@@ -190,7 +190,7 @@ public class RSocketAutoConfigurationRoutingTests {
assertThat(msg.getHeaders() assertThat(msg.getHeaders()
.get(DestinationPatternsMessageCondition.LOOKUP_DESTINATION_HEADER)).toString().equals("uppercase"); .get(DestinationPatternsMessageCondition.LOOKUP_DESTINATION_HEADER)).toString().equals("uppercase");
assertThat(msg.getHeaders() assertThat(msg.getHeaders()
.get(FunctionRSocketMessageHandler.RECONSILED_LOOKUP_DESTINATION_HEADER)).toString().equals(RoutingFunction.FUNCTION_NAME); .get(FunctionRSocketMessageHandler.RECONCILED_LOOKUP_DESTINATION_HEADER)).toString().equals(RoutingFunction.FUNCTION_NAME);
return msg.getPayload().toUpperCase(); return msg.getPayload().toUpperCase();
}; };
} }