Details
-
Improvement
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
None
Description
Lots of codes about the result code in the callback(ClientCnxn.EventThread#processEvent) is hardcode. For example:
} else if (p.response instanceof GetACLResponse) { ACLCallback cb = (ACLCallback) p.cb; GetACLResponse rsp = (GetACLResponse) p.response; if (rc == 0) { cb.processResult(rc, clientPath, p.ctx, rsp.getAcl(), rsp.getStat()); } else { cb.processResult(rc, clientPath, p.ctx, null, null); } }
This makes the codes difficult to maintain. What we want looks like this:
if (rc == Code.OK.intValue()) { //////////////////////// }
Attachments
Issue Links
- links to