mirror of https://github.com/apache/kafka.git
KAFKA-9514; The protocol generator generated useless condition when a field is made nullable and flexible version is used (#8793)
Reviewers: Colin P. McCabe <cmccabe@apache.org>
This commit is contained in:
parent
3af3ab9bf9
commit
21362ad7f7
|
@ -1436,8 +1436,8 @@ public final class MessageDataGenerator {
|
|||
alwaysEmitBlockScope(type.isString()).
|
||||
ifNull(() -> {
|
||||
VersionConditional.forVersions(nullableVersions, possibleVersions).
|
||||
ifMember(__ -> {
|
||||
VersionConditional.forVersions(fieldFlexibleVersions, possibleVersions).
|
||||
ifMember(presentVersions -> {
|
||||
VersionConditional.forVersions(fieldFlexibleVersions, presentVersions).
|
||||
ifMember(___ -> {
|
||||
buffer.printf("_writable.writeUnsignedVarint(0);%n");
|
||||
}).
|
||||
|
|
|
@ -243,12 +243,6 @@ For a detailed description of spotbugs bug categories, see https://spotbugs.read
|
|||
<Bug pattern="MS_MUTABLE_ARRAY"/>
|
||||
</Match>
|
||||
|
||||
<Match>
|
||||
<!-- The code generator generates useless condition. Disable the check temporarily. -->
|
||||
<Class name="org.apache.kafka.common.message.JoinGroupResponseData"/>
|
||||
<Bug pattern="UC_USELESS_CONDITION"/>
|
||||
</Match>
|
||||
|
||||
<Match>
|
||||
<!-- Suppress warnings about ignoring the return value of await.
|
||||
This is done intentionally because we use other clues to determine
|
||||
|
|
Loading…
Reference in New Issue