INT-1614 polishing

This commit is contained in:
Mark Fisher
2010-11-22 09:29:37 -05:00
parent 49d544acec
commit bc784eeca2
13 changed files with 88 additions and 80 deletions

View File

@@ -29,7 +29,7 @@ import com.jcraft.jsch.ChannelSftp.LsEntry;
* @author Mark Fisher
* @since 2.0
*/
class SftpInboundFileSynchronizer extends AbstractInboundFileSynchronizer<LsEntry> {
public class SftpInboundFileSynchronizer extends AbstractInboundFileSynchronizer<LsEntry> {
public SftpInboundFileSynchronizer(SessionFactory sessionFactory) {
super(sessionFactory);
@@ -43,7 +43,7 @@ class SftpInboundFileSynchronizer extends AbstractInboundFileSynchronizer<LsEntr
@Override
protected String getFilename(LsEntry file) {
return file.getFilename();
return (file != null ? file.getFilename() : null);
}
}

View File

@@ -61,7 +61,7 @@ class SftpSession implements Session {
}
catch (SftpException e) {
if (logger.isWarnEnabled()) {
logger.warn("rm failed", e);
logger.warn("failed to remove file", e);
}
return false;
}
@@ -84,7 +84,7 @@ class SftpSession implements Session {
}
catch (SftpException e) {
if (logger.isWarnEnabled()) {
logger.warn("ls failed", e);
logger.warn("failed to list files", e);
}
}
return new LsEntry[0];
@@ -97,7 +97,7 @@ class SftpSession implements Session {
}
catch (SftpException e) {
if (logger.isWarnEnabled()) {
logger.warn("get failed", e);
logger.warn("failed to retrieve file", e);
}
return null;
}
@@ -110,7 +110,7 @@ class SftpSession implements Session {
}
catch (SftpException e) {
if (logger.isWarnEnabled()) {
logger.warn("put failed", e);
logger.warn("failed to copy file", e);
}
}
}