You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacopo Cappellato <ja...@hotwaxmedia.com> on 2012/05/05 10:19:56 UTC
Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
On May 5, 2012, at 9:59 AM, jleroux@apache.org wrote:
> + boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength() > 0 ? true : false;
(a trivial note) this can be simplified with:
boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength() > 0;
Jacopo
Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
Right, that I copied from elsewhere in code, I will then review this/ese other part/s too...
Jacques
From: "Adrian Crum" <ad...@sandglass-software.com>
> On 5/5/2012 9:19 AM, Jacopo Cappellato wrote:
>> On May 5, 2012, at 9:59 AM, jleroux@apache.org wrote:
>>
>>> + boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength()> 0 ? true : false;
>> (a trivial note) this can be simplified with:
>>
>> boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength()> 0;
>>
>> Jacopo
>
> Also, the multiple catch blocks can be reduced to a singe catch
> (Exception e).
>
> -Adrian
>
Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
Posted by Adrian Crum <ad...@sandglass-software.com>.
On 5/5/2012 9:19 AM, Jacopo Cappellato wrote:
> On May 5, 2012, at 9:59 AM, jleroux@apache.org wrote:
>
>> + boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength()> 0 ? true : false;
> (a trivial note) this can be simplified with:
>
> boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength()> 0;
>
> Jacopo
Also, the multiple catch blocks can be reduced to a singe catch
(Exception e).
-Adrian
Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java
Posted by Jacques Le Roux <ja...@les7arts.com>.
Yes, indeed. I used another way before (instead of webXmlDoc.getElementsByTagName("distributable").getLength() > 0 ) an forgot to
remove the ternary operator after ;o)
Will do when I will get a chance....
Jacques
From: "Jacopo Cappellato" <ja...@hotwaxmedia.com>
> On May 5, 2012, at 9:59 AM, jleroux@apache.org wrote:
>
>> + boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength() > 0 ? true : false;
>
> (a trivial note) this can be simplified with:
>
> boolean appIsDistributable = webXmlDoc.getElementsByTagName("distributable").getLength() > 0;
>
> Jacopo