removed test compile warnings

INT-2267
removed test compile warnings(2)
This commit is contained in:
Oleg Zhurakousky
2011-11-29 12:34:52 -05:00
parent 5c606dfcb4
commit 634e190f5c
24 changed files with 124 additions and 116 deletions

View File

@@ -23,6 +23,7 @@ import org.apache.commons.logging.LogFactory;
import org.apache.commons.net.ftp.FTP;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPClientConfig;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTPReply;
import org.springframework.integration.MessagingException;
@@ -38,7 +39,7 @@ import org.springframework.util.Assert;
* @author Oleg Zhurakousky
* @since 2.0
*/
public abstract class AbstractFtpSessionFactory<T extends FTPClient> implements SessionFactory {
public abstract class AbstractFtpSessionFactory<T extends FTPClient> implements SessionFactory<FTPFile> {
public static final String DEFAULT_REMOTE_WORKING_DIRECTORY = "/";
@@ -123,7 +124,7 @@ public abstract class AbstractFtpSessionFactory<T extends FTPClient> implements
this.clientMode = clientMode;
}
public Session getSession() {
public Session<FTPFile> getSession() {
try {
T client = this.createClient();
if (client == null) {

View File

@@ -108,6 +108,7 @@ public class FtpInboundChannelAdapterParserTests {
public static class TestSessionFactoryBean implements FactoryBean<DefaultFtpSessionFactory> {
@SuppressWarnings({ "rawtypes", "unchecked" })
public DefaultFtpSessionFactory getObject() throws Exception {
DefaultFtpSessionFactory factory = mock(DefaultFtpSessionFactory.class);
Session session = mock(Session.class);

View File

@@ -26,6 +26,7 @@ import org.apache.commons.net.ftp.FTPFile;
import org.junit.After;
import org.junit.Test;
import org.mockito.Mockito;
import org.springframework.expression.Expression;
import org.springframework.expression.ExpressionParser;
import org.springframework.expression.spel.SpelParserConfiguration;
@@ -74,7 +75,6 @@ public class FtpInboundRemoteFileSystemSynchronizerTest {
ftpSessionFactory.setUsername("kermit");
ftpSessionFactory.setPassword("frog");
ftpSessionFactory.setHost("foo.com");
FtpInboundFileSynchronizer synchronizer = spy(new FtpInboundFileSynchronizer(ftpSessionFactory));
synchronizer.setDeleteRemoteFiles(true);
synchronizer.setRemoteDirectory("remote-test-dir");

View File

@@ -39,6 +39,7 @@ import static org.junit.Assert.assertEquals;
* @author Oleg Zhurakousky
*
*/
@SuppressWarnings({"rawtypes","unchecked"})
public class SessionFactoryTests {
@Test
@@ -63,6 +64,7 @@ public class SessionFactoryTests {
}
}
@Test
public void testStaleConnection() throws Exception{
SessionFactory sessionFactory = Mockito.mock(SessionFactory.class);