You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Vishal Changrani <vi...@ericsson.com> on 2013/01/30 00:23:56 UTC

Question about change to FileUtil.java

Hi,


In this particular SVN commit, in FileUtil.java method - compactPath, I see that the check for ".." in the path has been removed. Earier if path didn't contained '..' then the function would just return.

http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/FileUtil.java?r1=1388906&r2=1388905&pathrev=1388906

(camel/trunk/camel-core/src/main/java/org/apache/camel/util/FileUtil.java<http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/FileUtil.java?view=markup&pathrev=1388906> ) Rev: 1388906

Problem with that is that in my case I have a windows machine which is trying to FTP to a linux box via Camel's FTP File producer.
The target ftp folder is /public/data but as Camel tries to do a step wise change of directories, it first tries to cd to / but on calling FileUtil.compactPath this returns \\ (since host OS ..not remote OS in windows) and a cd to \\ on the ftp session fails :(

Can someoen please shed some light on why this change was done and if it could be reverted. The SVN commit says - "fixed a regression in ValidatorSchemaImportTest which was introduced with r1388762<http://svn.apache.org/viewvc?view=revision&amp;revision=1388762>"

Thanks,
-v-


Re: Question about change to FileUtil.java

Posted by vishal1981 <vi...@ericsson.com>.
alirght.



--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726592.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by Babak Vahdat <ba...@swissonline.ch>.

Am 30.01.13 21:57 schrieb "vishal1981" unter
<vi...@ericsson.com>:

>Thanks for the reply. Yes I did realize I could test against the snapshot
>but our QA won't accept beta releases of a 3rd party jar :).

No, what I meant was just to *temporarily* do that to see if the
regression is really fixed and then after the verification revert back
whatever you've changed inside your POM.

Babak

>Anyways..I am now testing against 2.10.2.
>regards,
>-v-
>
>________________________________
>From: Babak Vahdat [via Camel]
>[mailto:ml-node+s465427n5726583h99@n5.nabble.com]
>Sent: Wednesday, January 30, 2013 3:29 PM
>To: Vishal Changrani
>Subject: Re: Question about change to FileUtil.java
>
>Maybe you could already verify if the regression you're facing has been
>really fixed by the upcoming 2.10.4 release. For this you would need to
>(temporarily) add the Apache Snapshot repository into your POM:
>
>http://camel.apache.org/download.html#Download-Maven2snapshotrepositoryinp
>om
>
>then depend on Apache Camel 2.10.4-SNAPSHOT and run your tests to verify
>if the regression is really fixed for you.
>
>For any case the 2.10.4 SNAPSHOT zip is here:
>
>https://repository.apache.org/content/repositories/snapshots/org/apache/ca
>mel/apache-camel/2.10.4-SNAPSHOT/apache-camel-2.10.4-20130130.045958-38.zi
>p
>
>Babak
>
>vishal1981 wrote
>downloading from central works! thanks a lot.
>
>
>________________________________
>If you reply to this email, your message will be added to the discussion
>below:
>http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-t
>p5726527p5726583.html
>To unsubscribe from Question about change to FileUtil.java, click
>here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsu
>bscribe_by_code&node=5726527&code=dmlzaGFsLmNoYW5ncmFuaUBlcmljc3Nvbi5jb218
>NTcyNjUyN3wxNTgwMjU0NDcx>.
>NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macr
>o_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces
>.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.t
>emplate.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml
>-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.
>naml>
>
>
>
>
>--
>View this message in context:
>http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-t
>p5726527p5726584.html
>Sent from the Camel - Users mailing list archive at Nabble.com.



RE: Question about change to FileUtil.java

Posted by vishal1981 <vi...@ericsson.com>.
Thanks for the reply. Yes I did realize I could test against the snapshot but our QA won't accept beta releases of a 3rd party jar :).
Anyways..I am now testing against 2.10.2.
regards,
-v-

________________________________
From: Babak Vahdat [via Camel] [mailto:ml-node+s465427n5726583h99@n5.nabble.com]
Sent: Wednesday, January 30, 2013 3:29 PM
To: Vishal Changrani
Subject: Re: Question about change to FileUtil.java

Maybe you could already verify if the regression you're facing has been really fixed by the upcoming 2.10.4 release. For this you would need to (temporarily) add the Apache Snapshot repository into your POM:

http://camel.apache.org/download.html#Download-Maven2snapshotrepositoryinpom

then depend on Apache Camel 2.10.4-SNAPSHOT and run your tests to verify if the regression is really fixed for you.

For any case the 2.10.4 SNAPSHOT zip is here:

https://repository.apache.org/content/repositories/snapshots/org/apache/camel/apache-camel/2.10.4-SNAPSHOT/apache-camel-2.10.4-20130130.045958-38.zip

Babak

vishal1981 wrote
downloading from central works! thanks a lot.


________________________________
If you reply to this email, your message will be added to the discussion below:
http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726583.html
To unsubscribe from Question about change to FileUtil.java, click here<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5726527&code=dmlzaGFsLmNoYW5ncmFuaUBlcmljc3Nvbi5jb218NTcyNjUyN3wxNTgwMjU0NDcx>.
NAML<http://camel.465427.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726584.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by Babak Vahdat <ba...@swissonline.ch>.
Maybe you could already verify if the regression you're facing has been
really fixed by the upcoming 2.10.4 release. For this you would need to
(temporarily) add the Apache Snapshot repository into your POM:

http://camel.apache.org/download.html#Download-Maven2snapshotrepositoryinpom

then depend on Apache Camel 2.10.4-SNAPSHOT and run your tests to verify if
the regression is really fixed for you.

For any case the 2.10.4 SNAPSHOT zip is here:

https://repository.apache.org/content/repositories/snapshots/org/apache/camel/apache-camel/2.10.4-SNAPSHOT/apache-camel-2.10.4-20130130.045958-38.zip

Babak


vishal1981 wrote
> downloading from central works! thanks a lot.





--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726583.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by vishal1981 <vi...@ericsson.com>.
downloading from central works! thanks a lot.



--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726581.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by Babak Vahdat <ba...@swissonline.ch>.
You're right. I get the same 404 as I get redirected to the swiss mirror
here:

http://mirror.switch.ch/mirror/apache/dist/camel/apache-camel/2.10.2/apache-camel-2.10.2.zip

It seems the releases have not pushed properly into the mirrors. Have you
tried to download directly from the central itself?

http://repo.maven.apache.org/maven2/org/apache/camel/apache-camel/2.10.2/apache-camel-2.10.2.zip

Babak


vishal1981 wrote
> Hi,
> None of the mirrors seem to be working for 2.10.2. I keep getting 404.
> This has been the case with several other release for me. I am sure my
> connectivity is ok. I am able to download 2.10.3 just fine.
> I am downloading via,
> http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.10.2/apache-camel-2.10.2.zip
> 
> thanks,
> -v-





--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726580.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by vishal1981 <vi...@ericsson.com>.
Hi,
None of the mirrors seem to be working for 2.10.2. I keep getting 404.
This has been the case with several other release for me. I am sure my
connectivity is ok. I am able to download 2.10.3 just fine.
I am downloading via,
http://www.apache.org/dyn/closer.cgi/camel/apache-camel/2.10.2/apache-camel-2.10.2.zip

thanks,
-v-



--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726578.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by vishal1981 <vi...@ericsson.com>.
Ah ok so its only broken in 2.10.3. Great I will switch to 2.10.2.
Thanks again.



--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726576.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 30, 2013 at 4:58 PM, vishal1981
<vi...@ericsson.com> wrote:
> I do indeed use 2.10.3. May I know when is 2.10.4 anticipated?
>

You can use 2.10.2 in the mean time.

2.10.4 is scheduled for Feb/Mar 2013.


>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726566.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen

Re: Question about change to FileUtil.java

Posted by vishal1981 <vi...@ericsson.com>.
I do indeed use 2.10.3. May I know when is 2.10.4 anticipated?



--
View this message in context: http://camel.465427.n5.nabble.com/Question-about-change-to-FileUtil-java-tp5726527p5726566.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Question about change to FileUtil.java

Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jan 30, 2013 at 12:23 AM, Vishal Changrani
<vi...@ericsson.com> wrote:
> Hi,
>
>
> In this particular SVN commit, in FileUtil.java method - compactPath, I see that the check for ".." in the path has been removed. Earier if path didn't contained '..' then the function would just return.
>
> http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/FileUtil.java?r1=1388906&r2=1388905&pathrev=1388906
>
> (camel/trunk/camel-core/src/main/java/org/apache/camel/util/FileUtil.java<http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/FileUtil.java?view=markup&pathrev=1388906> ) Rev: 1388906
>
> Problem with that is that in my case I have a windows machine which is trying to FTP to a linux box via Camel's FTP File producer.
> The target ftp folder is /public/data but as Camel tries to do a step wise change of directories, it first tries to cd to / but on calling FileUtil.compactPath this returns \\ (since host OS ..not remote OS in windows) and a cd to \\ on the ftp session fails :(

What version of Camel do you use? If you use 2.10.3 then its a known
bug and has been fixed in the upcoming releases.

>
> Can someoen please shed some light on why this change was done and if it could be reverted. The SVN commit says - "fixed a regression in ValidatorSchemaImportTest which was introduced with r1388762<http://svn.apache.org/viewvc?view=revision&amp;revision=1388762>"
>
> Thanks,
> -v-
>



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
FuseSource is now part of Red Hat
Email: cibsen@redhat.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen