kerneltime commented on code in PR #3699:
URL: https://github.com/apache/ozone/pull/3699#discussion_r950540324
##########
hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/utils/db/CodecRegistry.java:
##########
@@ -105,15 +109,17 @@ private <T> Codec getCodec(T object) throws IOException {
*/
private <T> Codec getCodec(Class<T> format) throws IOException {
Codec<T> codec;
- if (valueCodecs.containsKey(format)) {
- codec = (Codec<T>) valueCodecs.get(format);
- } else if (valueCodecs.containsKey(format.getSuperclass())) {
- codec = (Codec<T>) valueCodecs.get(format.getSuperclass());
- } else {
- throw new IllegalStateException(
- "Codec is not registered for type: " + format);
Review Comment:
This adds codec support for interfaces implemented and not related to the
Jira. Can you add a comment in the PR or Jira describing the issue?
--
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]