Hello Devs,

I have completed working on this task OFBIZ-9254
<https://issues.apache.org/jira/browse/OFBIZ-9254> for JAVA files, GROOVY
files and uploaded the patches also. Now, I am working on the same for FTL
files and found that there are two patterns used in OFBiz for string
comparisons:
    a) <#if roleType.roleTypeId.equals("_NA_")> selected="selected"</#if>
    b) <#if showLocation == "Y">
I think it will be better to define a standard way to compare strings in
FTL also. This will help in cleaning & improving the code.

Let me know your thoughts.



Thanks & Regards,
Devanshu Vyas.

On Sat, Feb 18, 2017 at 3:47 PM, Michael Brohl <[email protected]>
wrote:

> +1, thanks, Devanshu!
>
> Regards,
>
> Michael
>
> Am 09.01.17 um 10:22 schrieb Devanshu Vyas:
>
>> Hello Devs,
>>
>> I found an inconsistency in the code for string comparison
>> *statusId.equals("PRUN_COMPLETED")* whereas it should be written as
>> *"PRUN_COMPLETED".equals(statusId)*
>> cause the former can throw NullPointerException if the variable found to
>> be
>> NULL.
>>
>> This code pattern can be found at several places and if you all agree with
>> this I can provide a patch for correcting code.
>>
>> Let me know your thoughts.
>>
>> Thanks & Regards,
>> Devanshu Vyas.
>>
>>
>
>

Reply via email to