Author: davsclaus Date: Sat Jun 5 16:00:30 2010 New Revision: 951734 URL: http://svn.apache.org/viewvc?rev=951734&view=rev Log: CAMEL-2790: execPbsz is optional.
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsOperations.java Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java?rev=951734&r1=951733&r2=951734&view=diff ============================================================================== --- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java (original) +++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsConfiguration.java Sat Jun 5 16:00:30 2010 @@ -29,7 +29,7 @@ public class FtpsConfiguration extends F private boolean isImplicit; private boolean useSecureDataChannel; private String execProt = "P"; - private long execPbsz; + private Long execPbsz; public FtpsConfiguration() { setProtocol("ftps"); @@ -82,7 +82,7 @@ public class FtpsConfiguration extends F * Sets whether to use secure data channel when transferring file content * <p/> * Default is <tt>false</tt> - * @see #setExecPbsz(long) + * @see #setExecPbsz(Long) * @see #setExecProt(String) */ public void setUseSecureDataChannel(boolean useSecureDataChannel) { @@ -106,7 +106,7 @@ public class FtpsConfiguration extends F this.execProt = execProt; } - public long getExecPbsz() { + public Long getExecPbsz() { return execPbsz; } @@ -117,7 +117,7 @@ public class FtpsConfiguration extends F * * @param execPbsz the buffer size */ - public void setExecPbsz(long execPbsz) { + public void setExecPbsz(Long execPbsz) { this.execPbsz = execPbsz; } } \ No newline at end of file Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsOperations.java URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsOperations.java?rev=951734&r1=951733&r2=951734&view=diff ============================================================================== --- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsOperations.java (original) +++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsOperations.java Sat Jun 5 16:00:30 2010 @@ -48,7 +48,9 @@ public class FtpsOperations extends FtpO if (log.isDebugEnabled()) { log.debug("Secure data channel being initialized with execPbsz=" + config.getExecPbsz() + ", execPort=" + config.getExecProt()); } - getFtpClient().execPBSZ(config.getExecPbsz()); + if (config.getExecPbsz() != null) { + getFtpClient().execPBSZ(config.getExecPbsz()); + } getFtpClient().execPROT(config.getExecProt()); } catch (SSLException e) { throw new GenericFileOperationFailedException(client.getReplyCode(),