You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Babak Vahdat <ba...@swissonline.ch> on 2013/03/19 21:37:29 UTC

http://svn.apache.org/r1458364

Hi Daniel,

had no luck with the Camel commits-mailing-list, so now trying this way:

http://camel.465427.n5.nabble.com/svn-commit-r1458364-in-camel-trunk-camel-core-pom-xml-components-pom-xml-tooling-maven-camel-packagea-tp5729428p5729447.html

Babak




--
View this message in context: http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: http://svn.apache.org/r1458364

Posted by Daniel Kulp <dk...@apache.org>.
On Mar 19, 2013, at 5:43 PM, Babak Vahdat <ba...@swissonline.ch> wrote:

> And there's also a potential NPE being introduced through this commit as well
> which could blow up as the folllowing *conservative* null-check has been
> removed:
> 
>   File[] files = componentMetaDir.listFiles();
>   if (files != null) {
> 
> So assuming a Camel user would create a regular file under the path
> "src/main/resources/META-INF/services/org/apache/camel/component" of his
> Maven module to put there whatever he thinks it would be neccessary for him,
> then using this plugin would now end up with (e.g. try this using the
> camel-jaxb module):
> 
> [ERROR] Failed to execute goal
> org.apache.camel:camel-package-maven-plugin:2.11-SNAPSHOT:generate-components-list
> (default) on project camel-jaxb: Execution default of goal
> org.apache.camel:camel-package-maven-plugin:2.11-SNAPSHOT:generate-components-list
> failed. NullPointerException -> [Help 1]
> 
> Instead of a nice log message being printed as the last statement of this
> Mojo informing him about the *missing* component *directory*:
> 
>  } else {
>    getLog().debug("No META-INF/services/org/apache/camel/component
> directory found. Are you sure you have created a Camel component?");
>  }
> 
> So IMHO that null-check should be put back again.

Yep.  Also add a check to see if it is a Directory.   

Thanks!
Dan



> 
> Babak
> 
> 
> dkulp@apache.org wrote
>> On Mar 19, 2013, at 4:51 PM, Daniel Kulp &lt;
> 
>> dkulp@
> 
>> &gt; wrote:
>> 
>>> 
>>> On Mar 19, 2013, at 4:37 PM, Babak Vahdat &lt;
> 
>> babak.vahdat@
> 
>> &gt; wrote:
>>> 
>>>> Hi Daniel,
>>>> 
>>>> had no luck with the Camel commits-mailing-list, so now trying this way:
>>>> 
>>>> http://camel.465427.n5.nabble.com/svn-commit-r1458364-in-camel-trunk-camel-core-pom-xml-components-pom-xml-tooling-maven-camel-packagea-tp5729428p5729447.html
>>> 
>>> Well, not a problem for git as this is never run in the root directory
>>> which is the only place a .git dir would be or the .gitignore. 
>>> 
>>> Also not a problem for modern versions of SVN for the same reason.  I
>>> assume you are using a 1.6.x version of svn? 
>> 
>> 
>> Fixed anyway.  :-)
>> 
>> Dan
>> 
>> 
>> 
>>> 
>>> Dan
>>> 
>>> 
>>> 
>>>> 
>>>> Babak
>>>> 
>>>> 
>>>> 
>>>> 
>>>> --
>>>> View this message in context:
>>>> http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448.html
>>>> Sent from the Camel Development mailing list archive at Nabble.com.
>>> 
>>> -- 
>>> Daniel Kulp
>>> 
> 
>> dkulp@
> 
>> - http://dankulp.com/blog
>>> Talend Community Coder - http://coders.talend.com
>>> 
>> 
>> -- 
>> Daniel Kulp
> 
>> dkulp@
> 
>> - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
> 
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448p5729455.html
> Sent from the Camel Development mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: http://svn.apache.org/r1458364

Posted by Babak Vahdat <ba...@swissonline.ch>.
And there's also a potential NPE being introduced through this commit as well
which could blow up as the folllowing *conservative* null-check has been
removed:

   File[] files = componentMetaDir.listFiles();
   if (files != null) {
 
So assuming a Camel user would create a regular file under the path
"src/main/resources/META-INF/services/org/apache/camel/component" of his
Maven module to put there whatever he thinks it would be neccessary for him,
then using this plugin would now end up with (e.g. try this using the
camel-jaxb module):

[ERROR] Failed to execute goal
org.apache.camel:camel-package-maven-plugin:2.11-SNAPSHOT:generate-components-list
(default) on project camel-jaxb: Execution default of goal
org.apache.camel:camel-package-maven-plugin:2.11-SNAPSHOT:generate-components-list
failed. NullPointerException -> [Help 1]

Instead of a nice log message being printed as the last statement of this
Mojo informing him about the *missing* component *directory*:

  } else {
    getLog().debug("No META-INF/services/org/apache/camel/component
directory found. Are you sure you have created a Camel component?");
  }

So IMHO that null-check should be put back again.

Babak


dkulp@apache.org wrote
> On Mar 19, 2013, at 4:51 PM, Daniel Kulp &lt;

> dkulp@

> &gt; wrote:
> 
>> 
>> On Mar 19, 2013, at 4:37 PM, Babak Vahdat &lt;

> babak.vahdat@

> &gt; wrote:
>> 
>>> Hi Daniel,
>>> 
>>> had no luck with the Camel commits-mailing-list, so now trying this way:
>>> 
>>> http://camel.465427.n5.nabble.com/svn-commit-r1458364-in-camel-trunk-camel-core-pom-xml-components-pom-xml-tooling-maven-camel-packagea-tp5729428p5729447.html
>> 
>> Well, not a problem for git as this is never run in the root directory
>> which is the only place a .git dir would be or the .gitignore. 
>> 
>> Also not a problem for modern versions of SVN for the same reason.  I
>> assume you are using a 1.6.x version of svn? 
> 
> 
> Fixed anyway.  :-)
> 
> Dan
> 
> 
> 
>> 
>> Dan
>> 
>> 
>> 
>>> 
>>> Babak
>>> 
>>> 
>>> 
>>> 
>>> --
>>> View this message in context:
>>> http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448.html
>>> Sent from the Camel Development mailing list archive at Nabble.com.
>> 
>> -- 
>> Daniel Kulp
>> 

> dkulp@

>  - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>> 
> 
> -- 
> Daniel Kulp

> dkulp@

>  - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com





--
View this message in context: http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448p5729455.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: http://svn.apache.org/r1458364

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

Am happy we could skip adding a note for the upcoming 2.11 release manager
about the svn version being used by him :-)

http://camel.apache.org/release-guide.html

Babak



--
View this message in context: http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448p5729453.html
Sent from the Camel Development mailing list archive at Nabble.com.

Re: http://svn.apache.org/r1458364

Posted by Daniel Kulp <dk...@apache.org>.
On Mar 19, 2013, at 4:51 PM, Daniel Kulp <dk...@apache.org> wrote:

> 
> On Mar 19, 2013, at 4:37 PM, Babak Vahdat <ba...@swissonline.ch> wrote:
> 
>> Hi Daniel,
>> 
>> had no luck with the Camel commits-mailing-list, so now trying this way:
>> 
>> http://camel.465427.n5.nabble.com/svn-commit-r1458364-in-camel-trunk-camel-core-pom-xml-components-pom-xml-tooling-maven-camel-packagea-tp5729428p5729447.html
> 
> Well, not a problem for git as this is never run in the root directory which is the only place a .git dir would be or the .gitignore. 
> 
> Also not a problem for modern versions of SVN for the same reason.  I assume you are using a 1.6.x version of svn? 


Fixed anyway.  :-)

Dan



> 
> Dan
> 
> 
> 
>> 
>> Babak
>> 
>> 
>> 
>> 
>> --
>> View this message in context: http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448.html
>> Sent from the Camel Development mailing list archive at Nabble.com.
> 
> -- 
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
> 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: http://svn.apache.org/r1458364

Posted by Daniel Kulp <dk...@apache.org>.
On Mar 19, 2013, at 4:37 PM, Babak Vahdat <ba...@swissonline.ch> wrote:

> Hi Daniel,
> 
> had no luck with the Camel commits-mailing-list, so now trying this way:
> 
> http://camel.465427.n5.nabble.com/svn-commit-r1458364-in-camel-trunk-camel-core-pom-xml-components-pom-xml-tooling-maven-camel-packagea-tp5729428p5729447.html

Well, not a problem for git as this is never run in the root directory which is the only place a .git dir would be or the .gitignore. 

Also not a problem for modern versions of SVN for the same reason.  I assume you are using a 1.6.x version of svn?

Dan



> 
> Babak
> 
> 
> 
> 
> --
> View this message in context: http://camel.465427.n5.nabble.com/http-svn-apache-org-r1458364-tp5729448.html
> Sent from the Camel Development mailing list archive at Nabble.com.

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com