Skip to content

Java: Fix SpringRequestMappingMethod URL Extraction #2 #19556

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
May 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Deprecate SpringRequestMappingMethod.getValue (which didn't work)
  • Loading branch information
owen-mc committed May 22, 2025
commit 59d4f039d8e8bf5b8b90390de7a24bada2c7b17d
Original file line number Diff line number Diff line change
Expand Up @@ -153,10 +153,8 @@ class SpringRequestMappingMethod extends SpringControllerMethod {
result = this.getProducesExpr().(CompileTimeConstantExpr).getStringValue()
}

/** Gets the "value" @RequestMapping annotation value, if present. */
string getValue() { result = requestMappingAnnotation.getStringValue("value") }


/** DEPRECATED: Use `getAValue()` instead. */
deprecated string getValue() { result = requestMappingAnnotation.getStringValue("value") }

/** Gets the "value" @RequestMapping annotation array string value, if present. */
Copy link
Preview

Copilot AI May 22, 2025

Choose a reason for hiding this comment

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

[nitpick] The doc comment for getAValue() could clarify the format of the returned string when multiple values are present (e.g., comma-separated).

Suggested change
/** Gets the "value" @RequestMapping annotation array string value, if present. */
/**
* Gets a single "value" from the @RequestMapping annotation array string, if present.
* If the annotation specifies multiple values, this method retrieves one of them.
*/

Copilot uses AI. Check for mistakes.

string getAValue() { result = requestMappingAnnotation.getAStringArrayValue("value") }
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy