You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2021/04/19 14:50:00 UTC

[jira] [Resolved] (SLING-10319) Use the "equals" method if value comparison was intended

     [ https://issues.apache.org/jira/browse/SLING-10319?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler resolved SLING-10319.
--------------------------------------
      Assignee: Carsten Ziegeler
    Resolution: Fixed

Replaced the if block with a much simpler variant.

Added full test coverage

https://github.com/apache/sling-org-apache-sling-auth-core/commit/17913d1668ad783e70fc5eace50d8fb5202baee0

> Use the "equals" method if value comparison was intended
> --------------------------------------------------------
>
>                 Key: SLING-10319
>                 URL: https://issues.apache.org/jira/browse/SLING-10319
>             Project: Sling
>          Issue Type: Improvement
>          Components: Authentication
>    Affects Versions: Auth Core 1.5.0, Auth Core 1.5.2
>            Reporter: Carsten Ziegeler
>            Assignee: Carsten Ziegeler
>            Priority: Major
>             Fix For: Auth Core 1.5.4
>
>
> See sonar check:
> https://sonarcloud.io/project/issues?id=apache_sling-org-apache-sling-auth-core&open=AWogePnQ9zLXaOU8uV59&resolved=false&types=BUG
> The fix suggested at
> https://github.com/apache/sling-org-apache-sling-auth-core/pull/1
> will cause a NPE. The whole if block needs to be reworked



--
This message was sent by Atlassian Jira
(v8.3.4#803005)