Sonar Fixes

Critical smells for packages `o.s.i.i*`.

* Polishing

* Polishing

* Missed saving a file.

* Polishing - PR Comments

* More PR comments.
This commit is contained in:
Gary Russell
2018-12-07 14:59:27 -05:00
committed by Artem Bilan
parent 4760c54097
commit 563f526ddc
17 changed files with 95 additions and 39 deletions

View File

@@ -62,8 +62,8 @@ public class PayloadsArgumentResolver extends AbstractExpressionEvaluator
Collection<Message<?>> messages = (Collection<Message<?>>) payload;
if (!this.expressionCache.containsKey(parameter)) {
Payloads payloads = parameter.getParameterAnnotation(Payloads.class); // NOSONAR never null - supportsParameter()
String expression = payloads.value();
Payloads payloads = parameter.getParameterAnnotation(Payloads.class);
String expression = payloads.value(); // NOSONAR never null - supportsParameter()
if (StringUtils.hasText(expression)) {
this.expressionCache.put(parameter, EXPRESSION_PARSER.parseExpression("![payload." + expression + "]"));
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2016 the original author or authors.
* Copyright 2002-2018 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.
@@ -16,16 +16,19 @@
package org.springframework.integration.mapping;
import org.springframework.lang.Nullable;
import org.springframework.messaging.Message;
/**
* Strategy interface for mapping from a {@link Message} to an Object.
*
* @author Mark Fisher
* @author Gary Russell
*/
@FunctionalInterface
public interface OutboundMessageMapper<T> {
@Nullable
T fromMessage(Message<?> message) throws Exception;
}