You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2009/12/09 07:31:31 UTC
svn commit: r888709 - in /camel/trunk/components/camel-ftp/src:
main/java/org/apache/camel/component/file/remote/
test/java/org/apache/camel/component/file/remote/
Author: davsclaus
Date: Wed Dec 9 06:31:29 2009
New Revision: 888709
URL: http://svn.apache.org/viewvc?rev=888709&view=rev
Log:
Fixed CS.
Modified:
camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
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/FtpsEndpoint.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java
camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpOperations.java Wed Dec 9 06:31:29 2009
@@ -47,7 +47,7 @@
*/
public class FtpOperations implements RemoteFileOperations<FTPFile> {
- protected final transient Log LOG = LogFactory.getLog(getClass());
+ protected final transient Log log = LogFactory.getLog(getClass());
protected final FTPClient client;
protected final FTPClientConfig clientConfig;
protected RemoteFileEndpoint<FTPFile> endpoint;
@@ -62,8 +62,8 @@
}
public boolean connect(RemoteFileConfiguration configuration) throws GenericFileOperationFailedException {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Connecting using FTPClient: " + client);
+ if (log.isTraceEnabled()) {
+ log.trace("Connecting using FTPClient: " + client);
}
String host = configuration.getHost();
@@ -71,12 +71,12 @@
String username = configuration.getUsername();
if (clientConfig != null) {
- LOG.trace("Configuring FTPClient with config: " + clientConfig);
+ log.trace("Configuring FTPClient with config: " + clientConfig);
client.configure(clientConfig);
}
- if (LOG.isTraceEnabled()) {
- LOG.trace("Connecting to " + configuration.remoteServerInformation());
+ if (log.isTraceEnabled()) {
+ log.trace("Connecting to " + configuration.remoteServerInformation());
}
boolean connected = false;
@@ -84,8 +84,8 @@
while (!connected) {
try {
- if (LOG.isTraceEnabled() && attempt > 0) {
- LOG.trace("Reconnect attempt #" + attempt + " connecting to + " + configuration.remoteServerInformation());
+ if (log.isTraceEnabled() && attempt > 0) {
+ log.trace("Reconnect attempt #" + attempt + " connecting to + " + configuration.remoteServerInformation());
}
client.connect(host, port);
// must check reply code if we are connected
@@ -106,8 +106,8 @@
failed = new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString(), e.getMessage(), e);
}
- if (LOG.isTraceEnabled()) {
- LOG.trace("Cannot connect due: " + failed.getMessage());
+ if (log.isTraceEnabled()) {
+ log.trace("Cannot connect due: " + failed.getMessage());
}
attempt++;
if (attempt > endpoint.getMaximumReconnectAttempts()) {
@@ -125,23 +125,23 @@
// must enter passive mode directly after connect
if (configuration.isPassiveMode()) {
- LOG.trace("Using passive mode connections");
+ log.trace("Using passive mode connections");
client.enterLocalPassiveMode();
}
try {
boolean login;
if (username != null) {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Attempting to login user: " + username + " using password: " + configuration.getPassword());
+ if (log.isTraceEnabled()) {
+ log.trace("Attempting to login user: " + username + " using password: " + configuration.getPassword());
}
login = client.login(username, configuration.getPassword());
} else {
- LOG.trace("Attempting to login anonymous");
+ log.trace("Attempting to login anonymous");
login = client.login("anonymous", null);
}
- if (LOG.isTraceEnabled()) {
- LOG.trace("User " + (username != null ? username : "anonymous") + " logged in: " + login);
+ if (log.isTraceEnabled()) {
+ log.trace("User " + (username != null ? username : "anonymous") + " logged in: " + login);
}
if (!login) {
throw new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString());
@@ -174,8 +174,8 @@
}
public boolean deleteFile(String name) throws GenericFileOperationFailedException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Deleting file: " + name);
+ if (log.isDebugEnabled()) {
+ log.debug("Deleting file: " + name);
}
try {
return this.client.deleteFile(name);
@@ -185,8 +185,8 @@
}
public boolean renameFile(String from, String to) throws GenericFileOperationFailedException {
- if (LOG.isDebugEnabled()) {
- LOG.debug("Renaming file: " + from + " to: " + to);
+ if (log.isDebugEnabled()) {
+ log.debug("Renaming file: " + from + " to: " + to);
}
try {
return client.rename(from, to);
@@ -196,8 +196,8 @@
}
public boolean buildDirectory(String directory, boolean absolute) throws GenericFileOperationFailedException {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Building directory: " + directory);
+ if (log.isTraceEnabled()) {
+ log.trace("Building directory: " + directory);
}
try {
String originalDirectory = client.printWorkingDirectory();
@@ -207,8 +207,8 @@
// maybe the full directory already exists
success = client.changeWorkingDirectory(directory);
if (!success) {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Trying to build remote directory: " + directory);
+ if (log.isTraceEnabled()) {
+ log.trace("Trying to build remote directory: " + directory);
}
success = client.makeDirectory(directory);
if (!success) {
@@ -251,7 +251,7 @@
} catch (IOException e) {
throw new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString(), e.getMessage(), e);
} finally {
- ObjectHelper.close(os, "retrieve: " + name, LOG);
+ ObjectHelper.close(os, "retrieve: " + name, log);
}
}
@@ -308,18 +308,18 @@
} catch (IOException e) {
throw new GenericFileOperationFailedException(client.getReplyCode(), client.getReplyString(), e.getMessage(), e);
- } finally {
+ } finally {
// need to close the stream before rename it
- ObjectHelper.close(os, "retrieve: " + name, LOG);
+ ObjectHelper.close(os, "retrieve: " + name, log);
}
- if (LOG.isDebugEnabled()) {
- LOG.debug("Retrieve file to local work file result: " + result);
+ if (log.isDebugEnabled()) {
+ log.debug("Retrieve file to local work file result: " + result);
}
if (result) {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Renaming local in progress file from: " + temp + " to: " + local);
+ if (log.isTraceEnabled()) {
+ log.trace("Renaming local in progress file from: " + temp + " to: " + local);
}
// operation went okay so rename temp to local after we have retrieved the data
if (!FileUtil.renameFile(temp, local)) {
@@ -337,8 +337,8 @@
boolean existFile = existsFile(name);
if (existFile && endpoint.getFileExist() == GenericFileExist.Ignore) {
// ignore but indicate that the file was written
- if (LOG.isTraceEnabled()) {
- LOG.trace("An existing file already exists: " + name + ". Ignore and do not override it.");
+ if (log.isTraceEnabled()) {
+ log.trace("An existing file already exists: " + name + ". Ignore and do not override it.");
}
return true;
} else if (existFile && endpoint.getFileExist() == GenericFileExist.Fail) {
@@ -359,7 +359,7 @@
} catch (InvalidPayloadException e) {
throw new GenericFileOperationFailedException("Cannot store file: " + name, e);
} finally {
- ObjectHelper.close(is, "store: " + name, LOG);
+ ObjectHelper.close(is, "store: " + name, log);
}
}
@@ -446,8 +446,8 @@
// do not try to build root / folder
if (!directory.equals("/")) {
- if (LOG.isTraceEnabled()) {
- LOG.trace("Trying to build remote directory by chunk: " + directory);
+ if (log.isTraceEnabled()) {
+ log.trace("Trying to build remote directory by chunk: " + directory);
}
success = client.makeDirectory(directory);
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=888709&r1=888708&r2=888709&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 Wed Dec 9 06:31:29 2009
@@ -27,7 +27,7 @@
public class FtpsConfiguration extends FtpConfiguration {
private String securityProtocol = "TLS";
- private boolean isImplicit = false;
+ private boolean isImplicit;
public FtpsConfiguration() {
setProtocol("ftps");
@@ -57,17 +57,15 @@
}
/**
- * Returns the secutiry mode(Implicit/Explicit).
+ * Returns the security mode(Implicit/Explicit).
* true - Implicit Mode / False - Explicit Mode
- *
- * @return isImplicit
*/
public boolean isImplicit() {
return isImplicit;
}
/**
- * Set the secutiry mode(Implicit/Explicit).
+ * Set the security mode(Implicit/Explicit).
* true - Implicit Mode / False - Explicit Mode
*/
public void setIsImplicit(boolean isImplicit) {
Modified: camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java (original)
+++ camel/trunk/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpsEndpoint.java Wed Dec 9 06:31:29 2009
@@ -24,6 +24,7 @@
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.TrustManagerFactory;
+import org.apache.camel.util.ObjectHelper;
import org.apache.commons.net.ftp.FTPClient;
import org.apache.commons.net.ftp.FTPFile;
import org.apache.commons.net.ftp.FTPSClient;
@@ -52,30 +53,29 @@
}
/**
- * create the FTPS client.
- *
- * @throws Exception
+ * Create the FTPS client.
*/
protected FTPClient createFtpClient() throws Exception {
- FTPSClient client = new FTPSClient(
- getFtpsConfiguration().getSecurityProtocol(),
- getFtpsConfiguration().isImplicit());
+ FTPSClient client = new FTPSClient(getFtpsConfiguration().getSecurityProtocol(),
+ getFtpsConfiguration().isImplicit());
if (ftpClientKeyStoreParameters != null) {
- String type = (ftpClientKeyStoreParameters.containsKey("type")) ?
- (String) ftpClientKeyStoreParameters.get("type") :
- KeyStore.getDefaultType();
+ String type = (ftpClientKeyStoreParameters.containsKey("type"))
+ ? (String) ftpClientKeyStoreParameters.get("type") : KeyStore.getDefaultType();
String file = (String) ftpClientKeyStoreParameters.get("file");
String password = (String) ftpClientKeyStoreParameters.get("password");
- String algorithm = (ftpClientKeyStoreParameters.containsKey("algorithm")) ?
- (String) ftpClientKeyStoreParameters.get("algorithm") :
- KeyManagerFactory.getDefaultAlgorithm();
+ String algorithm = (ftpClientKeyStoreParameters.containsKey("algorithm"))
+ ? (String) ftpClientKeyStoreParameters.get("algorithm")
+ : KeyManagerFactory.getDefaultAlgorithm();
String keyPassword = (String) ftpClientKeyStoreParameters.get("keyPassword");
KeyStore keyStore = KeyStore.getInstance(type);
FileInputStream keyStoreFileInputStream = new FileInputStream(new File(file));
- keyStore.load(keyStoreFileInputStream, password.toCharArray());
- keyStoreFileInputStream.close();
+ try {
+ keyStore.load(keyStoreFileInputStream, password.toCharArray());
+ } finally {
+ ObjectHelper.close(keyStoreFileInputStream, "keyStore", log);
+ }
KeyManagerFactory keyMgrFactory = KeyManagerFactory.getInstance(algorithm);
keyMgrFactory.init(keyStore, keyPassword.toCharArray());
@@ -84,20 +84,22 @@
}
if (ftpClientTrustStoreParameters != null) {
- String type = (ftpClientTrustStoreParameters.containsKey("type")) ?
- (String) ftpClientTrustStoreParameters.get("type") :
- KeyStore.getDefaultType();
+ String type = (ftpClientTrustStoreParameters.containsKey("type"))
+ ? (String) ftpClientTrustStoreParameters.get("type") : KeyStore.getDefaultType();
String file = (String) ftpClientTrustStoreParameters.get("file");
String password = (String) ftpClientTrustStoreParameters.get("password");
- String algorithm = (ftpClientTrustStoreParameters.containsKey("algorithm")) ?
- (String) ftpClientTrustStoreParameters.get("algorithm") :
- TrustManagerFactory.getDefaultAlgorithm();
+ String algorithm = (ftpClientTrustStoreParameters.containsKey("algorithm"))
+ ? (String) ftpClientTrustStoreParameters.get("algorithm")
+ : TrustManagerFactory.getDefaultAlgorithm();
KeyStore trustStore = KeyStore.getInstance(type);
FileInputStream trustStoreFileInputStream = new FileInputStream(new File(file));
- trustStore.load(trustStoreFileInputStream, password.toCharArray());
- trustStoreFileInputStream.close();
-
+ try {
+ trustStore.load(trustStoreFileInputStream, password.toCharArray());
+ } finally {
+ ObjectHelper.close(trustStoreFileInputStream, "trustStore", log);
+ }
+
TrustManagerFactory trustMgrFactory = TrustManagerFactory.getInstance(algorithm);
trustMgrFactory.init(trustStore);
@@ -126,14 +128,14 @@
}
/**
- * Set the key store parameter
+ * Set the key store parameters
*/
public void setFtpClientKeyStoreParameters(Map<String, Object> param) {
this.ftpClientKeyStoreParameters = param;
}
/**
- * Set the trust store parameter
+ * Set the trust store parameters
*/
public void setFtpClientTrustStoreParameters(Map<String, Object> param) {
this.ftpClientTrustStoreParameters = param;
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,9 +29,9 @@
public class FileToFtpsExplicitSSLWithClientAuthTest extends FtpsServerExplicitSSLWithClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=SSL&isImplicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS" +
- "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=SSL&isImplicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ + "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitSSLWithoutClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,8 +29,8 @@
public class FileToFtpsExplicitSSLWithoutClientAuthTest extends FtpsServerExplicitSSLWithoutClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=SSL&isImplicit=false";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=SSL&isImplicit=false";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,9 +29,9 @@
public class FileToFtpsExplicitTLSWithClientAuthTest extends FtpsServerExplicitTLSWithClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=TLS&isImplicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS" +
- "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=TLS&isImplicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ + "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsExplicitTLSWithoutClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,8 +29,8 @@
public class FileToFtpsExplicitTLSWithoutClientAuthTest extends FtpsServerExplicitTLSWithoutClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=TLS&isImplicit=false";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=TLS&isImplicit=false";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,9 +29,9 @@
public class FileToFtpsImplicitSSLWithClientAuthTest extends FtpsServerImplicitSSLWithClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=SSL&isImplicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS" +
- "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=SSL&isImplicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ + "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitSSLWithoutClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,8 +29,8 @@
public class FileToFtpsImplicitSSLWithoutClientAuthTest extends FtpsServerImplicitSSLWithoutClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=SSL&isImplicit=true";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=SSL&isImplicit=true";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,9 +29,9 @@
public class FileToFtpsImplicitTLSWithClientAuthTest extends FtpsServerImplicitTLSWithClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=TLS&isImplicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS" +
- "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=TLS&isImplicit=true&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ + "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsImplicitTLSWithoutClientAuthTest.java Wed Dec 9 06:31:29 2009
@@ -29,8 +29,8 @@
public class FileToFtpsImplicitTLSWithoutClientAuthTest extends FtpsServerImplicitTLSWithoutClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=TLS&isImplicit=true";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=TLS&isImplicit=true";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomKeyAndTrustStorePropertiesTest.java Wed Dec 9 06:31:29 2009
@@ -29,11 +29,11 @@
public class FileToFtpsWithCustomKeyAndTrustStorePropertiesTest extends FtpsServerExplicitSSLWithClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=SSL&isImplicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS" +
- "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password" +
- "&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=JKS" +
- "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=SSL&isImplicit=false&ftpClient.keyStore.file=./src/test/resources/server.jks&ftpClient.keyStore.type=JKS"
+ + "&ftpClient.keyStore.algorithm=SunX509&ftpClient.keyStore.password=password&ftpClient.keyStore.keyPassword=password"
+ + "&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=JKS"
+ + "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FileToFtpsWithCustomTrustStorePropertiesTest.java Wed Dec 9 06:31:29 2009
@@ -29,9 +29,9 @@
public class FileToFtpsWithCustomTrustStorePropertiesTest extends FtpsServerExplicitSSLWithoutClientAuthTestSupport {
private String getFtpUrl() {
- return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000" +
- "&securityProtocol=SSL&isImplicit=false&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=JKS" +
- "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password";
+ return "ftps://admin@localhost:" + getPort() + "/tmp2/camel?password=admin&consumer.initialDelay=5000"
+ + "&securityProtocol=SSL&isImplicit=false&ftpClient.trustStore.file=./src/test/resources/server.jks&ftpClient.trustStore.type=JKS"
+ + "&ftpClient.trustStore.algorithm=SunX509&ftpClient.trustStore.password=password";
}
@Test
Modified: camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java?rev=888709&r1=888708&r2=888709&view=diff
==============================================================================
--- camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java (original)
+++ camel/trunk/components/camel-ftp/src/test/java/org/apache/camel/component/file/remote/FtpsServerTestSupport.java Wed Dec 9 06:31:29 2009
@@ -65,7 +65,7 @@
sslConfigFactory.setClientAuthentication(getClientAuth());
- if (Boolean.valueOf(getClientAuth()).booleanValue() == true) {
+ if (Boolean.valueOf(getClientAuth())) {
sslConfigFactory.setTruststoreFile(FTPSERVER_KEYSTORE);
sslConfigFactory.setTruststoreType("JKS");
sslConfigFactory.setTruststoreAlgorithm("SunX509");