Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java

Jacopo Cappellato-4

On May 5, 2012, at 9:59 AM, [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java

Adrian Crum-3
On 5/5/2012 9:19 AM, Jacopo Cappellato wrote:
> On May 5, 2012, at 9:59 AM, [hidden email] 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

Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java

Jacques Le Roux
Administrator
In reply to this post by Jacopo Cappellato-4
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" <[hidden email]>
> On May 5, 2012, at 9:59 AM, [hidden email] 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
Reply | Threaded
Open this post in threaded view
|

Re: svn commit: r1334336 - /ofbiz/trunk/framework/catalina/src/org/ofbiz/catalina/container/CatalinaContainer.java

Jacques Le Roux
Administrator
In reply to this post by Adrian Crum-3
Right, that I copied from elsewhere in code, I will then review this/ese other part/s too...

Jacques

From: "Adrian Crum" <[hidden email]>

> On 5/5/2012 9:19 AM, Jacopo Cappellato wrote:
>> On May 5, 2012, at 9:59 AM, [hidden email] 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
>