Skip to content

fix: compile with -parameters so the actuator endpoint can be built - #525

Merged
zantvoort merged 1 commit into
mainfrom
actuator-endpoint-parameters
Aug 23, 2026
Merged

fix: compile with -parameters so the actuator endpoint can be built#525
zantvoort merged 1 commit into
mainfrom
actuator-endpoint-parameters

Conversation

@zantvoort

Copy link
Copy Markdown
Collaborator

Problem

StormEndpoint.configure is a @WriteOperation taking 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's MethodParameters attribute, which javac emits only under -parameters. The root maven-compiler-plugin configuration set source/target/release and nothing else, so the attribute was absent from the published jar and the endpoint could not be built:

IllegalStateException: Failed to extract parameter names for public java.util.Map
  st.orm.spring.boot.StormEndpoint.configure(String, Integer, String, String, Boolean, Integer)
	at o.s.b.actuate.endpoint.invoke.reflect.OperationMethodParameters.<init>
	...
	at o.s.b.actuate.endpoint.web.PathMappedEndpoints.<init>

The throw happens inside PathMappedEndpoints, so it takes the whole application context down rather than degrading the single endpoint. Any application that exposes storm through management.endpoints.web.exposure.include fails to start outright.

This was found the expensive way: an application added storm to 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> on maven-compiler-plugin in the root pluginManagement. Modules that carry their own <configuration>storm-spring among them — inherit it, since none of them sets parameters itself; Maven merges the two element-wise.

Verification

storm-spring compiles with debug parameters release 21, and the class file now carries the attribute:

MethodParameters:
  Name                           Flags
  slowStatement
  slowStatementLimit
  statements
  duration
  callSites
  limit

Full reactor build passes (36 modules).

StormEndpoint is the only @Endpoint in the framework and it is Java, so no Kotlin -java-parameters change 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.

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.
@zantvoort
zantvoort merged commit 86b1419 into main Aug 23, 2026
8 checks passed
@zantvoort
zantvoort deleted the actuator-endpoint-parameters branch August 23, 2026 01:13
@codecov

codecov Bot commented Aug 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

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.

1 participant