Add default block in AbstractDnsMessage (#11327)

Motivation:

Every switch block should also have a default case.

Modification:

Add default block in AbstractDnsMessage to ensure we not fall-through by mistake

Result:

Cleanup

Signed-off-by: xingrufei <xingrufei@sogou-inc.com>
This commit is contained in:
skyguard1 2021-05-28 14:49:18 +08:00 committed by GitHub
parent cfe631ad05
commit c098b48692
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -427,6 +427,8 @@ public abstract class AbstractDnsMessage extends AbstractReferenceCounted implem
return authorities;
case 3:
return additionals;
default:
break;
}
throw new Error(); // Should never reach here.
@ -446,6 +448,8 @@ public abstract class AbstractDnsMessage extends AbstractReferenceCounted implem
case 3:
additionals = value;
return;
default:
break;
}
throw new Error(); // Should never reach here.