You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@zookeeper.apache.org by "zengchao (Jira)" <ji...@apache.org> on 2020/11/13 02:51:00 UTC
[jira] [Created] (ZOOKEEPER-4001) AuditHelper.addAuditLog(...) more
readable
zengchao created ZOOKEEPER-4001:
-----------------------------------
Summary: AuditHelper.addAuditLog(...) more readable
Key: ZOOKEEPER-4001
URL: https://issues.apache.org/jira/browse/ZOOKEEPER-4001
Project: ZooKeeper
Issue Type: Improvement
Components: server
Reporter: zengchao
{code:java}
if (failedTxn) {
CreateRequest createRequest = new CreateRequest();
deserialize(request, createRequest);
path = createRequest.getPath();
createMode =
getCreateMode(createRequest);
} else {
createMode = getCreateMode(request);
}
{code}
may modified to
{code:java}
CreateRequest createRequest = new CreateRequest();
deserialize(request, createRequest);
createMode = getCreateMode(createRequest);
if (failedTxn) {
path = createRequest.getPath();
}
{code}
the getCreateMode(request) is this
{code:java}
private static String getCreateMode(Request request) throws IOException, KeeperException {
CreateRequest createRequest = new CreateRequest();
deserialize(request, createRequest);
return getCreateMode(createRequest);
}
{code}
is this change more readable?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)