You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@syncope.apache.org by Colm O hEigeartaigh <co...@apache.org> on 2016/12/09 10:36:07 UTC

Some minor questions about issues thrown up by FindBugs in the client module

Hi,

As mentioned on IRC, I have a few questions about some issues raised by
FindBugs in the client module.

1) AjaxWizardMgtButtonBar +46...there is a call to
"wizard.getWizardModel().isCancelVisible();" which ignores the return
value. Not sure what the purpose of this line is?

2) ApprovalsWidget +72 - "if (!latestAlerts.equals(updatedApprovals)) {".
This equality check is faulty, as latestAlerts is of type "IModel<List<T>>"
whereas updatedApprovals is of type "List<WorkflowFormTO>". What should
this check be instead?

3) EntitlementSyncopeOperations +73 -
"role.getEntitlements().contains(entitlement);" ignores the return value.
I'm guessing this should be in an "if" statement?

Thanks,

Colm.


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: Some minor questions about issues thrown up by FindBugs in the client module

Posted by Colm O hEigeartaigh <co...@apache.org>.
Yes I'll do it, thanks for the feedback!

Colm.

On Fri, Dec 9, 2016 at 10:44 AM, Fabio Martelli <fa...@gmail.com>
wrote:

> Hi Colm, thanks for reporting.
> See below my comments.
>
> Regards,
> F.
>
> Il 09/12/2016 11:36, Colm O hEigeartaigh ha scritto:
>
>> Hi,
>>
>> As mentioned on IRC, I have a few questions about some issues raised by
>> FindBugs in the client module.
>>
>> 1) AjaxWizardMgtButtonBar +46...there is a call to
>> "wizard.getWizardModel().isCancelVisible();" which ignores the return
>> value. Not sure what the purpose of this line is?
>>
> Right, we don't need that line. It can be removed.
>
>>
>> 2) ApprovalsWidget +72 - "if (!latestAlerts.equals(updatedApprovals)) {".
>> This equality check is faulty, as latestAlerts is of type
>> "IModel<List<T>>"
>> whereas updatedApprovals is of type "List<WorkflowFormTO>". What should
>> this check be instead?
>>
> Right again. It becomes
>
> if (!latestAlerts.getObject().equals(updatedApprovals)) {
>
>
>
>> 3) EntitlementSyncopeOperations +73 -
>> "role.getEntitlements().contains(entitlement);" ignores the return value.
>> I'm guessing this should be in an "if" statement?
>>
> Correct!
>
> Please, would you like to fix these bugs?
>
>
> --
> Fabio Martelli
> https://it.linkedin.com/pub/fabio-martelli/1/974/a44
> http://blog.tirasa.net/author/fabio/index.html
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Apache Syncope PMC
> http://people.apache.org/~fmartelli/
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: Some minor questions about issues thrown up by FindBugs in the client module

Posted by Fabio Martelli <fa...@gmail.com>.
Hi Colm, thanks for reporting.
See below my comments.

Regards,
F.

Il 09/12/2016 11:36, Colm O hEigeartaigh ha scritto:
> Hi,
>
> As mentioned on IRC, I have a few questions about some issues raised by
> FindBugs in the client module.
>
> 1) AjaxWizardMgtButtonBar +46...there is a call to
> "wizard.getWizardModel().isCancelVisible();" which ignores the return
> value. Not sure what the purpose of this line is?
Right, we don't need that line. It can be removed.
>
> 2) ApprovalsWidget +72 - "if (!latestAlerts.equals(updatedApprovals)) {".
> This equality check is faulty, as latestAlerts is of type "IModel<List<T>>"
> whereas updatedApprovals is of type "List<WorkflowFormTO>". What should
> this check be instead?
Right again. It becomes

if (!latestAlerts.getObject().equals(updatedApprovals)) {


>
> 3) EntitlementSyncopeOperations +73 -
> "role.getEntitlements().contains(entitlement);" ignores the return value.
> I'm guessing this should be in an "if" statement?
Correct!

Please, would you like to fix these bugs?


-- 
Fabio Martelli
https://it.linkedin.com/pub/fabio-martelli/1/974/a44
http://blog.tirasa.net/author/fabio/index.html

Tirasa - Open Source Excellence
http://www.tirasa.net/

Apache Syncope PMC
http://people.apache.org/~fmartelli/