Fix remaining compiler warnings
Fix remaining Java compiler warnings, mainly around missing generics or deprecated code. Also add the `-Werror` compiler option to ensure that any future warnings will fail the build. Issue: SPR-11064
This commit is contained in:
@@ -13,20 +13,22 @@
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package org.springframework.messaging.core;
|
||||
|
||||
|
||||
/**
|
||||
* Strategy interface that resolves a given name to a destination.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 4.0
|
||||
*/
|
||||
public interface DestinationResolver<D> {
|
||||
|
||||
|
||||
/**
|
||||
* @param name
|
||||
* @return
|
||||
* @throws DestinationResolutionException
|
||||
* Resolve the given {@code name} to a destination.
|
||||
* @param name the name to resolve
|
||||
* @return the destination (must not be {@code null})
|
||||
* @throws DestinationResolutionException if the name cannot be resolved
|
||||
*/
|
||||
D resolveDestination(String name) throws DestinationResolutionException;
|
||||
|
||||
|
||||
@@ -140,7 +140,7 @@ public class SendToMethodReturnValueHandler implements HandlerMethodReturnValueH
|
||||
else {
|
||||
SendTo sendTo = returnType.getMethodAnnotation(SendTo.class);
|
||||
String[] destinations = getTargetDestinations(sendTo, inputHeaders, this.defaultDestinationPrefix);
|
||||
for (String destination : getTargetDestinations(sendTo, inputHeaders, this.defaultDestinationPrefix)) {
|
||||
for (String destination : destinations) {
|
||||
this.messagingTemplate.convertAndSend(destination, returnValue, postProcessor);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,20 +16,17 @@
|
||||
|
||||
package org.springframework.messaging.simp.handler;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
import org.springframework.messaging.Message;
|
||||
import org.springframework.messaging.MessageHandler;
|
||||
import org.springframework.messaging.MessagingException;
|
||||
import org.springframework.messaging.core.MessageSendingOperations;
|
||||
import org.springframework.messaging.simp.SimpMessageHeaderAccessor;
|
||||
import org.springframework.messaging.support.MessageBuilder;
|
||||
import org.springframework.util.Assert;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
||||
/**
|
||||
* Provides support for messages sent to "user" destinations, translating the
|
||||
* destination to one or more user-specific destination(s) and then sending message(s)
|
||||
|
||||
Reference in New Issue
Block a user