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 "Julian Sedding (JIRA)" <ji...@apache.org> on 2016/02/23 11:22:18 UTC

[jira] [Updated] (OAK-4041) AccessControlValidatorTest: assert exception IDs

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

Julian Sedding updated OAK-4041:
--------------------------------
    Attachment: OAK-4041.jsedding.patch

Attached is a [proposed patch|^OAK-4041.jsedding.patch].

[~anchela] There are several occasions where I am not sure if the correct exception is thrown. I placed TODOs in the patch and would appreciate if you could verify them. Thanks.

> AccessControlValidatorTest: assert exception IDs
> ------------------------------------------------
>
>                 Key: OAK-4041
>                 URL: https://issues.apache.org/jira/browse/OAK-4041
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: security
>    Affects Versions: 1.3.16
>            Reporter: Julian Sedding
>            Assignee: angela
>            Priority: Minor
>         Attachments: OAK-4041.jsedding.patch
>
>
> While working on OAK-4037 I noticed that one test tested for the exception message. I agree that it is interesting to check that the expected exception is thrown, but I think we don't need to rely on the full message.
> Instead the {{AccessControlValidatorTest}} could be enhanced to assert the exception IDs (e.g. "OakAccessControl0006"). IMHO this would provide a good trade-off between asserting that the "correct" exception is thrown and not relying too much on the exact wording of the message.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)