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

Julian Reschke updated OAK-4363:
--------------------------------
    Fix Version/s: 1.6

> SyncMBeanImpl: result lacks 'uid' if error messages has been created from 
> ExternalIdentityRef
> ---------------------------------------------------------------------------------------------
>
>                 Key: OAK-4363
>                 URL: https://issues.apache.org/jira/browse/OAK-4363
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: auth-external
>            Reporter: angela
>            Assignee: angela
>            Priority: Minor
>             Fix For: 1.6, 1.5.2
>
>
> while writing tests for the SyncMBeanImpl I noticed the following method in 
> the {{Delegatee}} that writes a sync-result for an error based on an 
> {{ExternalIdentityRef}} but sets the 'uid' to empty string:
> {code}
> private static void append(@Nonnull List<String> list, @Nonnull 
> ExternalIdentityRef idRef, @Nonnull Exception e) {
>         String eid = JsonUtil.getJsonString(idRef.getString());
>         String msg = JsonUtil.getJsonString(e.toString());
>         String jsonStr = String.format("{op:\"ERR\",uid:\"\",eid:%s,msg:%s}", 
> eid, msg);
>         list.add(jsonStr);
>     }
> {code}
> so, I was wondering why the 'uid' is not retrieved from the 
> {{ExternalIdentityRef}} object passed to the method. Something like:
> {code}
> private static void append(@Nonnull List<String> list, @Nonnull 
> ExternalIdentityRef idRef, @Nonnull Exception e) {
>         String uid = JsonUtil.getJsonString(idRef.getId());
>         String eid = JsonUtil.getJsonString(idRef.getString());
>         String msg = JsonUtil.getJsonString(e.toString());
>         String jsonStr = String.format("{op:\"ERR\",uid:%s,eid:%s,msg:%s}", 
> uid, eid, msg);
>         list.add(jsonStr);
>     }
> {code}
> [~tripod], was there a particular reason for setting 'uid' to empty string?
> or in other words: what was the drawback of setting the uid as exposed by 
> {{ExternalIdentityRef.getID()}}?



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

Reply via email to