You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "angela (JIRA)" <ji...@apache.org> on 2019/05/16 09:02:00 UTC

[jira] [Updated] (OAK-8323) Refactor redundant checks for null in TokenValidator

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

angela updated OAK-8323:
------------------------
    Attachment: OAK-8323.patch

> Refactor redundant checks for null in TokenValidator
> ----------------------------------------------------
>
>                 Key: OAK-8323
>                 URL: https://issues.apache.org/jira/browse/OAK-8323
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: core, security
>            Reporter: angela
>            Assignee: angela
>            Priority: Minor
>         Attachments: OAK-8323.patch
>
>
> [~stillalex], due to missing nullability annotations in {{org.apache.jackrabbit.oak.spi.commit,Validator}} interface, some old implementations in the security code base like {{TokenValidator}} perform redundant checks for null that would only occur in case of invalid sequences of {{Validator.childNodeAdded}} followed by {{Validator.childNodeChanged}} (or similar examples with delete/add and delete/change). I would prefer to verify the expected non-null state and have the subsequent not perform extra checks for null that are never executed.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)