camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Kulp <dk...@apache.org>
Subject Re: http://svn.apache.org/r1458364
Date Tue, 19 Mar 2013 21:58:04 GMT

On Mar 19, 2013, at 5:43 PM, Babak Vahdat <babak.vahdat@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


Mime
View raw message