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:
Phillip Webb
2013-11-21 18:15:09 -08:00
parent 4de3291dc7
commit 59002f2456
540 changed files with 1943 additions and 1843 deletions

View File

@@ -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;

View File

@@ -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);
}
}

View File

@@ -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)