Skip to content

fix(java): match package-private methods in Spring resolver#851

Open
Liurchen wants to merge 1 commit into
colbymchenry:mainfrom
Liurchen:fix/spring-package-private-handler
Open

fix(java): match package-private methods in Spring resolver#851
Liurchen wants to merge 1 commit into
colbymchenry:mainfrom
Liurchen:fix/spring-package-private-handler

Conversation

@Liurchen

Copy link
Copy Markdown

The method-matching regex only handled Kotlin fun name( and Java methods with explicit visibility modifiers (public/private/protected). Java package-private methods (no modifier) were silently skipped, breaking route-to-handler references for many Spring controllers.

Add a third regex alternative that matches a return type followed by the method name: \b(?:[A-Z]\w*(?:<[^>]>)?|void)\s+(\w+)\s(

Verified on realworld-java21-springboot3: 4/19 -> 19/19 route-handler connections.

The method-matching regex only handled Kotlin `fun name(` and Java
methods with explicit visibility modifiers (public/private/protected).
Java package-private methods (no modifier) were silently skipped,
breaking route-to-handler references for many Spring controllers.

Add a third regex alternative that matches a return type followed by
the method name: \b(?:[A-Z]\w*(?:<[^>]*>)?|void)\s+(\w+)\s*\(

Verified on realworld-java21-springboot3: 4/19 -> 19/19 route-handler
connections.
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