Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
3.4.0
-
Reviewed
Description
When I read some class about Edits of NameNode, I found that there are much redundant cast inĀ FSEditLogOp.class, I feel that we should remove them.
Such as:
static UpdateBlocksOp getInstance(OpInstanceCache cache) { return (UpdateBlocksOp)cache.get(OP_UPDATE_BLOCKS); }
Because cache.get() have cast the response to T, such as:
@SuppressWarnings("unchecked") public <T extends FSEditLogOp> T get(FSEditLogOpCodes opCode) { return useCache ? (T)CACHE.get().get(opCode) : (T)newInstance(opCode); }
Attachments
Issue Links
- links to