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 2015/10/29 11:09:27 UTC
[jira] [Resolved] (OAK-3523) DefaultSyncContext catches
ClassCastException
[ https://issues.apache.org/jira/browse/OAK-3523?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
angela resolved OAK-3523.
-------------------------
Resolution: Fixed
Fix Version/s: 1.3.9
Committed revision 1711209.
> DefaultSyncContext catches ClassCastException
> ---------------------------------------------
>
> Key: OAK-3523
> URL: https://issues.apache.org/jira/browse/OAK-3523
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: auth-external
> Reporter: angela
> Assignee: angela
> Labels: technical_debt
> Fix For: 1.3.9
>
> Attachments: OAK-3523_classcast_only.patch
>
>
> the group and group-member sync code in the {{DefaultSyncContext}} twice catches {{ClassCastException}} and swallows exception situations, where a user is found, when actually a {{Group}} was expected.
> i would suggest to
> - explicitly test the assumption wrt {{ExternalIdentity}} being a group (instead of waiting for the exception)
> - make use of {{UserManager.getAuthorizable(String, Class) to explicitly retrieve a Group with a given ID, when this is actually expected. This method will throws an {{AuthorizableTypeException}} if there exists a {{User}} with that ID as thus properly raise the unexpected behavior instead of swallowing with a log-warning.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)