Skip to content

docs: add troubleshooting for Spring reflection parameter issue#257

Merged
rcasia merged 1 commit intomainfrom
docs/add-parameters-flag-documentation
Mar 17, 2026
Merged

docs: add troubleshooting for Spring reflection parameter issue#257
rcasia merged 1 commit intomainfrom
docs/add-parameters-flag-documentation

Conversation

@rcasia
Copy link
Owner

@rcasia rcasia commented Mar 17, 2026

Summary

Adds troubleshooting documentation for resolving Spring test failures when parameter names are not available via reflection.

Changes

  • Added a new "Troubleshooting" section to README.md
  • Documented the Spring reflection parameter issue and its solution
  • Provided clear steps to configure JDTLS compiler to preserve parameter names

Problem

When running Spring tests that use reflection (e.g., @MockBean, @WebMvcTest), tests fail with:

java.lang.IllegalArgumentException: Name for argument of type [int] not specified,
and parameter name information not available via reflection.
Ensure that the compiler uses the '-parameters' flag.

Solution

Configure the JDTLS compiler by adding org.eclipse.jdt.core.compiler.codegen.methodParameters=generate to .settings/org.eclipse.jdt.core.prefs in the project root.

Fixes #243

Add documentation for resolving Spring test failures when parameter
names are not available via reflection. Includes configuration steps
for enabling the -parameters compiler flag via JDTLS settings.

Fixes #243
@rcasia rcasia merged commit 991bc9a into main Mar 17, 2026
1 check passed
@rcasia rcasia deleted the docs/add-parameters-flag-documentation branch March 17, 2026 13:39
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.

Add hint when -parameters jvm param is missing

1 participant