You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: kroxylicious-runtime/src/main/templates/BodyDecoder.ftl
-20Lines changed: 0 additions & 20 deletions
Original file line number
Diff line number
Diff line change
@@ -70,27 +70,7 @@ public class BodyDecoder {
70
70
return switch (apiKey) {
71
71
<#list messageSpecs as messageSpec>
72
72
<#if messageSpec.type?lower_case == 'response'>
73
-
<#if messageSpec.name == 'ApiVersionsResponse'>
74
-
case ${retrieveApiKey(messageSpec)} -> {
75
-
// KIP-511 when the client receives an unsupported version for the ApiVersionResponse, it fails back to version 0
76
-
// Use the same algorithm as https://github.com/apache/kafka/blob/a41c10fd49841381b5207c184a385622094ed440/clients/src/main/java/org/apache/kafka/common/requests/ApiVersionsResponse.java#L90-L106
77
-
int prev = accessor.readerIndex();
78
-
try {
79
-
yield new ${messageSpec.name}Data(accessor, apiVersion);
80
-
}
81
-
catch (RuntimeException e) {
82
-
accessor.readerIndex(prev);
83
-
if (apiVersion != 0) {
84
-
yield new ${messageSpec.name}Data(accessor, (short) 0);
85
-
}
86
-
else {
87
-
throw e;
88
-
}
89
-
}
90
-
}
91
-
<#else>
92
73
case ${retrieveApiKey(messageSpec)} -> new ${messageSpec.name}Data(accessor, apiVersion);
0 commit comments