From d53958a35e0b942e928f29eb425921fc9585b28e Mon Sep 17 00:00:00 2001 From: Daniel Vaseekaran Date: Fri, 22 Nov 2024 16:16:09 -0500 Subject: [PATCH 1/4] Added HTTPMethod --- ...-framework-5.x-to-6.0-web-applications.yaml | 18 ++++++++++++++++++ .../org/konveyor/controller/Controller.java | 1 + ...ework-5.x-to-6.0-web-applications.test.yaml | 6 ++++++ 3 files changed, 25 insertions(+) diff --git a/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml b/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml index e184518..cbfcf4d 100644 --- a/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml +++ b/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml @@ -49,3 +49,21 @@ url: https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-6.0-Release-Notes#web-applications - title: 'Specific Spring Framwork change' url: https://github.com/spring-projects/spring-framework/issues/28552 + +- ruleID: spring-framework-5.x-to-6.0-web-applications-00002 + category: mandatory + effort: 1 + labels: + - konveyor.io/source=spring5 + - konveyor.io/target=spring6+ + when: + java.referenced: + pattern: org.springframework.http.HttpMethod + location: IMPORT + description: Refactor HttpMethod from enum to class + message: "HTTPMethod has been updated from an ENUM to a CLASS" + 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 \ No newline at end of file diff --git a/default/generated/spring-framework/tests/data/web-applications/src/main/java/org/konveyor/controller/Controller.java b/default/generated/spring-framework/tests/data/web-applications/src/main/java/org/konveyor/controller/Controller.java index 142e057..038ffc1 100644 --- a/default/generated/spring-framework/tests/data/web-applications/src/main/java/org/konveyor/controller/Controller.java +++ b/default/generated/spring-framework/tests/data/web-applications/src/main/java/org/konveyor/controller/Controller.java @@ -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 { diff --git a/default/generated/spring-framework/tests/spring-framework-5.x-to-6.0-web-applications.test.yaml b/default/generated/spring-framework/tests/spring-framework-5.x-to-6.0-web-applications.test.yaml index 114eb70..8d7289a 100644 --- a/default/generated/spring-framework/tests/spring-framework-5.x-to-6.0-web-applications.test.yaml +++ b/default/generated/spring-framework/tests/spring-framework-5.x-to-6.0-web-applications.test.yaml @@ -10,3 +10,9 @@ tests: mode: "source-only" hasIncidents: exactly: 1 +- ruleID: spring-framework-5.x-to-6.0-web-applications-00002 + testCases: + - name: tc-1 + hasIncidents: + exactly: 1 + messageMatches: "HTTPMethod has been updated from an ENUM to a CLASS" From bfdc896f793481556fdb89d4b9eca82ddfed0633 Mon Sep 17 00:00:00 2001 From: Daniel Vaseekaran Date: Fri, 22 Nov 2024 16:23:19 -0500 Subject: [PATCH 2/4] test --- .../spring-framework-5.x-to-6.0-web-applications.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml b/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml index cbfcf4d..dd56667 100644 --- a/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml +++ b/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml @@ -66,4 +66,4 @@ - 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 \ No newline at end of file + url: https://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/http/HttpMethod.html \ No newline at end of file From 56a250b6aac90d2ad3436bde0bd5477f4186766b Mon Sep 17 00:00:00 2001 From: Daniel Vaseekaran Date: Mon, 25 Nov 2024 09:40:41 -0500 Subject: [PATCH 3/4] Addressing PR Comments --- .../spring-framework-5.x-to-6.0-web-applications.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml b/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml index dd56667..7582bcf 100644 --- a/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml +++ b/default/generated/spring-framework/spring-framework-5.x-to-6.0-web-applications.yaml @@ -51,7 +51,7 @@ url: https://github.com/spring-projects/spring-framework/issues/28552 - ruleID: spring-framework-5.x-to-6.0-web-applications-00002 - category: mandatory + category: potential effort: 1 labels: - konveyor.io/source=spring5 @@ -60,8 +60,8 @@ java.referenced: pattern: org.springframework.http.HttpMethod location: IMPORT - description: Refactor HttpMethod from enum to class - message: "HTTPMethod has been updated from an ENUM to a CLASS" + 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 From 0b7de8ee56116ef773774dd89259655dab84a790 Mon Sep 17 00:00:00 2001 From: Daniel Vaseekaran Date: Mon, 2 Dec 2024 09:43:25 -0500 Subject: [PATCH 4/4] Signing Commit Signed-off-by: Daniel Vaseekaran