eliminated all compiler warnings throughout all projects

updated pom to emit compiler warnings so that any new ones become obvious
added serialVersionUID to classes that could reasonably need to be serialized (GenericMessage, MessageHeaders, etc)
@SuppressWarnings("serial") on all others
@SuppressWarnings("unused") on private static classes used as spring beans for testing (their methods never get called from java)
eliminated all redundant casting
introducted generics metadata where raw types were still being used
changed public API on several FactoryBeans (by adding <Type> information to 'implements FactoryBean' clause)
This commit is contained in:
Chris Beams
2010-05-25 23:18:25 +00:00
parent 8599343832
commit e5219dfe8f
69 changed files with 291 additions and 277 deletions

View File

@@ -34,8 +34,6 @@ public abstract class IpHeaders {
private static final String TCP = IP + "tcp_";
private static final String UDP = IP + "udp_";
public static final String HOSTNAME = IP + "hostname";
public static final String IP_ADDRESS = IP + "address";

View File

@@ -16,13 +16,11 @@
package org.springframework.integration.ip.config;
import org.w3c.dom.Element;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.xml.ParserContext;
import org.springframework.integration.config.xml.AbstractConsumerEndpointParser;
import org.springframework.integration.config.xml.IntegrationNamespaceUtils;
import org.springframework.util.StringUtils;
import org.w3c.dom.Element;
/**
* Parser for the &lt;outbound-gateway&gt; element of the integration 'jms' namespace.

View File

@@ -21,7 +21,6 @@ import java.net.Socket;
import javax.net.SocketFactory;
import org.junit.Ignore;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

View File

@@ -46,7 +46,7 @@ public class SocketMessageMapperTests {
public void testToMessage() throws Exception {
SocketMessageMapper mapper = new SocketMessageMapper();
Message<byte[]> message = mapper.toMessage(new StubSocketReader());
assertEquals(TEST_PAYLOAD, new String((byte[]) message.getPayload()));
assertEquals(TEST_PAYLOAD, new String(message.getPayload()));
assertEquals(InetAddress.getLocalHost().getHostName(), message
.getHeaders().get(IpHeaders.HOSTNAME));
assertEquals(InetAddress.getLocalHost().getHostAddress(), message