Skip to content

Fix feign-core test compilation broken by removed Request.create overload#3406

Merged
velo merged 5 commits into
OpenFeign:masterfrom
seonwooj0810:fix/core-logger-test-compile
Jun 11, 2026
Merged

Fix feign-core test compilation broken by removed Request.create overload#3406
velo merged 5 commits into
OpenFeign:masterfrom
seonwooj0810:fix/core-logger-test-compile

Conversation

@seonwooj0810

@seonwooj0810 seonwooj0810 commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

What

master currently fails to build: several test classes still use APIs removed in f9159cf ("prevent Content-Length smuggling, log format-string injection, and common-pool starvation in streaming bodies"), so test compilation fails with:

[ERROR] incompatible types: Charset cannot be converted to RequestTemplate

This breaks master's own snapshot builds (e.g. CircleCI 11938, 11953) and every PR branch rebased onto current master (e.g. #3382, CircleCI 12024/12030).

How

Test-only changes, adapting the affected call sites to the current API (the CI reactor stops at the first failing module, so these surfaced one module at a time):

  • feign-coreJavaLoggerTest, LoggerRebufferTest: switch 10 call sites from the removed Request.create(HttpMethod, String, Map, byte[], Charset) overload to the current (Body, RequestTemplate) signature with null body/template, matching the existing usage in RetryableExceptionTest. The logger tests only exercise response rebuffering, so the request body/charset is irrelevant to their assertions.
  • feign-slf4jSlf4jLoggerTest: same removed Request.create overload, plus a missing feign.Util import.
  • feign-validation / feign-validation-jakartaBeanValidationMethodInterceptorTest: replace the removed RequestTemplate#body(String) with body(Request.Body.of(...)).

I also grepped the whole repo for the remaining removed APIs (RequestTemplate#body(String), requestCharset(), the byte[]-returning body(), ThrowingConsumer, FeignBodyEntity) — no further usages outside src/main.

No production code is touched.

…signature

JavaLoggerTest and LoggerRebufferTest still called the
Request.create(..., byte[], Charset) overload removed in f9159cf,
breaking test compilation of feign-core on master. Use the
(Body, RequestTemplate) signature with null arguments, matching the
existing usage in RetryableExceptionTest.
…e) signature

Slf4jLoggerTest had the same problem as the feign-core logger tests:
it called the removed Request.create(..., byte[], Charset) overload and
also referenced feign.Util without an import, breaking feign-slf4j test
compilation once feign-core compiles again.
… signature

Both BeanValidationMethodInterceptorTest variants still used the
RequestTemplate#body(String) overload removed in f9159cf.

@velo velo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code changes are test-only and look compatible, but the required CircleCI pr-build check timed out before completing. Per project policy, this cannot be approved until the required check completes successfully. Please rerun CI and ensure it is green.

velo and others added 2 commits June 11, 2026 09:34
@velo velo merged commit 18fe771 into OpenFeign:master Jun 11, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants