Skip to content

Use correct key for shortcut field in SetRequestUriGatewayFilterFactory#4064

Merged
ryanjbaxter merged 1 commit intospring-cloud:4.3.xfrom
ryanjbaxter:fix-set-request-uri-shortcut
Feb 6, 2026
Merged

Use correct key for shortcut field in SetRequestUriGatewayFilterFactory#4064
ryanjbaxter merged 1 commit intospring-cloud:4.3.xfrom
ryanjbaxter:fix-set-request-uri-shortcut

Conversation

@ryanjbaxter
Copy link
Copy Markdown
Contributor

Fixes #4062

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request fixes a critical bug in the SetRequestUriGatewayFilterFactory where shortcut configuration syntax (e.g., - SetRequestUri=http://127.0.0.1:8081) was causing NullPointerException. The issue was caused by a mismatch between the field name returned by shortcutFieldOrder() and the actual property name in the Config class.

Changes:

  • Updated shortcutFieldOrder() to return "template" instead of "name" (defined via NAME_KEY) to match the Config class's template field
  • Added TEMPLATE_KEY constant for consistency with other similar gateway filter factories
  • Added unit test to verify the correct shortcut field order

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
SetRequestUriGatewayFilterFactory.java Fixed shortcutFieldOrder() to return "template" matching Config.template field, added TEMPLATE_KEY constant
SetRequestUriGatewayFilterFactoryTests.java Added test to verify shortcutFieldOrder() returns "template"

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@ryanjbaxter ryanjbaxter merged commit 50c9ce7 into spring-cloud:4.3.x Feb 6, 2026
8 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.

Issue with shortcut configuration not working for SetRequestUriGatewayFilterFactory

4 participants