Details
-
Improvement
-
Status: Resolved
-
Trivial
-
Resolution: Fixed
-
None
Description
if (failedTxn) { CreateRequest createRequest = new CreateRequest(); deserialize(request, createRequest); path = createRequest.getPath(); createMode = getCreateMode(createRequest); } else { createMode = getCreateMode(request); }
may modified to
CreateRequest createRequest = new CreateRequest(); deserialize(request, createRequest); createMode = getCreateMode(createRequest); if (failedTxn) { path = createRequest.getPath(); }
the getCreateMode(request) is this
private static String getCreateMode(Request request) throws IOException, KeeperException { CreateRequest createRequest = new CreateRequest(); deserialize(request, createRequest); return getCreateMode(createRequest); }
is this change more readable?