Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
-
None
Description
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:
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); }
so, I was wondering why the 'uid' is not retrieved from the ExternalIdentityRef object passed to the method. Something like:
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); }
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()?
Attachments
Issue Links
- is related to
-
OAK-4264 Improve testing of SyncMBeanImpl
- Closed