Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ public TreeVisitor<?, ExecutionContext> getVisitor() {
private static class ImplicitWebAnnotationNamesVisitor extends JavaIsoVisitor<ExecutionContext> {
private static final Set<String> PARAM_ANNOTATIONS = Stream.of(
"PathVariable",
"RequestParam",
"RequestHeader",
"RequestAttribute",
"CookieValue",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ public ResponseEntity<String> getUser(@PathVariable Long id,
);
}

@Issue("#4")
@Issue("https://github.com/openrewrite/rewrite-spring/issues/736")
@Test
void removeUnnecessarySpacingInFollowingAnnotationArgument() {
void preserveRequestParamNameWhenCompilerMetadataIsUnknown() {
//language=java
rewriteRun(
java(
Expand All @@ -106,7 +106,7 @@ public ResponseEntity<String> getUser(
public class UsersController {
@GetMapping("/{id}")
public ResponseEntity<String> getUser(
@RequestParam(defaultValue = 3) int count) {
@RequestParam(name = "count", defaultValue = 3) int count) {
}
}
"""
Expand Down