Skip to content
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

Create rules for changed HttpMethod class #197

Closed
wants to merge 2 commits into from
Closed
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 @@ -137,3 +137,21 @@
url: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.0-Release-Notes#web-applications
- title: 'GitHub issue: Make SourceHttpMessageConverter optional'
url: https://github.com/spring-projects/spring-framework/issues/29535

- ruleID: spring-framework-5.x-to-6.0-web-applications-00040
category: potential
effort: 1
labels:
- konveyor.io/source=spring5
- konveyor.io/target=spring6+
when:
java.referenced:
pattern: org.springframework.http.HttpMethod
location: IMPORT
description: HttpMethod has be upgraded from an ENUM to a CLASS
message: "HttpMethod is now a class and no longer an enum. Though the public API has been maintained, some migration might be necessary (i.e. change from EnumSet to Set, use if else instead of switch). Check the specific Spring Framework change for more information in the links"
links:
- title: 'Specific Spring Framework Change'
url: https://github.com/spring-projects/spring-framework/issues/27697
- title: 'Spring Documentation'
url: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpMethod.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.http.HttpMethod;

@RestController
public class Controller {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,9 @@ tests:
mode: "source-only"
hasIncidents:
exactly: 6
- ruleID: spring-framework-5.x-to-6.0-web-applications-00040
testCases:
- name: tc-1
hasIncidents:
exactly: 1
messageMatches: "HttpMethod is now a class and no longer an enum. Though the public API has been maintained, some migration might be necessary (i.e. change from EnumSet to Set, use if else instead of switch). Check the specific Spring Framework change for more information in the links"
Loading