sumitagrawl commented on code in PR #8073:
URL: https://github.com/apache/ozone/pull/8073#discussion_r1995120804
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/TypedTable.java:
##########
@@ -94,25 +95,33 @@ public TypedTable(RDBTable rawTable,
CodecRegistry codecRegistry, Class<KEY> keyType,
Class<VALUE> valueType,
CacheType cacheType, String threadNamePrefix) throws IOException {
- this.rawTable = Objects.requireNonNull(rawTable, "rawTable==null");
- Objects.requireNonNull(codecRegistry, "codecRegistry == null");
-
- this.keyType = Objects.requireNonNull(keyType, "keyType == null");
- this.keyCodec = codecRegistry.getCodecFromClass(keyType);
- Objects.requireNonNull(keyCodec, "keyCodec == null");
-
- this.valueType = Objects.requireNonNull(valueType, "valueType == null");
- this.valueCodec = codecRegistry.getCodecFromClass(valueType);
- Objects.requireNonNull(valueCodec, "valueCodec == null");
-
- this.supportCodecBuffer = keyCodec.supportCodecBuffer()
Review Comment:
We can not put above check before being used as java restriction,
public TypedTable(RDBTable rawTable,
CodecRegistry codecRegistry, Class<KEY> keyType,
Class<VALUE> valueType,
CacheType cacheType, String threadNamePrefix) throws IOException {
> **<---- before this(), its not allowed to add above check, and after
this() has no meaning of this check.**
this(rawTable, codecRegistry.getCodecFromClass(keyType),
codecRegistry.getCodecFromClass(valueType),
cacheType, threadNamePrefix);
}
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]