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:
parent
cfe631ad05
commit
c098b48692
@ -427,6 +427,8 @@ public abstract class AbstractDnsMessage extends AbstractReferenceCounted implem
|
|||||||
return authorities;
|
return authorities;
|
||||||
case 3:
|
case 3:
|
||||||
return additionals;
|
return additionals;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error(); // Should never reach here.
|
throw new Error(); // Should never reach here.
|
||||||
@ -446,6 +448,8 @@ public abstract class AbstractDnsMessage extends AbstractReferenceCounted implem
|
|||||||
case 3:
|
case 3:
|
||||||
additionals = value;
|
additionals = value;
|
||||||
return;
|
return;
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
throw new Error(); // Should never reach here.
|
throw new Error(); // Should never reach here.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user