Author: davsclaus
Date: Tue Jan 27 07:28:14 2009
New Revision: 738016

URL: http://svn.apache.org/viewvc?rev=738016&view=rev
Log:
CAMEL-1296: camel-ftp should condigure the endpoint with the full uri (caused 
by CAMEL-941).

Modified:
    
camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileComponent.java

Modified: 
camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileComponent.java
URL: 
http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileComponent.java?rev=738016&r1=738015&r2=738016&view=diff
==============================================================================
--- 
camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileComponent.java
 (original)
+++ 
camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/RemoteFileComponent.java
 Tue Jan 27 07:28:14 2009
@@ -51,11 +51,14 @@
     protected RemoteFileEndpoint createEndpoint(String uri, String remaining, 
Map parameters) throws Exception {
         RemoteFileConfiguration config = getConfiguration().copy();
 
-        // get the uri part before the options as they can be non URI valid 
such as the expression using $ chars
+        // get the base uri part before the options as they can be non URI 
valid such as the expression using $ chars
+        // and the URI constructor will regard $ as an illegal character and 
we dont want to enforce end users to
+        // to espace the $ for the expression (file language)
+        String baseUri = uri;
         if (uri.indexOf("?") != -1) {
-            uri = uri.substring(0, uri.indexOf("?"));
+            baseUri = uri.substring(0, uri.indexOf("?"));
         }
-        config.configure(new URI(uri));
+        config.configure(new URI(baseUri));
 
         // lets make sure we copy the configuration as each endpoint can
         // customize its own version


Reply via email to