fix: compile with -parameters so the actuator endpoint can be built - #525
Merged
Conversation
StormEndpoint.configure is a write operation taking six arguments, and Spring Boot Actuator binds those by name. Since Spring Framework 6 the only source for a parameter name is the MethodParameters attribute, which javac emits only under -parameters, and the compiler plugin did not set it. Building the endpoint therefore threw at startup: IllegalStateException: Failed to extract parameter names for public java.util.Map st.orm.spring.boot.StormEndpoint.configure(...) The throw comes from PathMappedEndpoints, so it takes the whole application context with it rather than degrading the one endpoint. Any application exposing storm through management.endpoints.web.exposure fails to start. Setting the flag in pluginManagement covers every module. Modules that carry their own compiler configuration inherit it, since none of them sets parameters itself.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
StormEndpoint.configureis a@WriteOperationtaking six arguments, and Spring Boot Actuator binds those by name. Since Spring Framework 6 the only source for a parameter name is the class file'sMethodParametersattribute, whichjavacemits only under-parameters. The rootmaven-compiler-pluginconfiguration setsource/target/releaseand nothing else, so the attribute was absent from the published jar and the endpoint could not be built:The throw happens inside
PathMappedEndpoints, so it takes the whole application context down rather than degrading the single endpoint. Any application that exposesstormthroughmanagement.endpoints.web.exposure.includefails to start outright.This was found the expensive way: an application added
stormto its exposure list, and the deployed image crash-looped for eight hours while every local build kept working, because a locally installed jar happened to differ from the published one.Fix
<parameters>true</parameters>onmaven-compiler-pluginin the rootpluginManagement. Modules that carry their own<configuration>—storm-springamong them — inherit it, since none of them setsparametersitself; Maven merges the two element-wise.Verification
storm-springcompiles withdebug parameters release 21, and the class file now carries the attribute:Full reactor build passes (36 modules).
StormEndpointis the only@Endpointin the framework and it is Java, so no Kotlin-java-parameterschange is needed to fix this. The flag does apply to every Java module, which is the intent — it is what Spring wants generally, not a targeted patch.