From cca3f2e17e709c8b67e25f7fb8db1a6698610c4c Mon Sep 17 00:00:00 2001 From: Dmytro Bezruk Date: Fri, 12 Jul 2024 13:38:06 +0300 Subject: [PATCH 01/21] [CRQ-38890] - SCA Updates. --- pom.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 54c833ff..c47a1e46 100644 --- a/pom.xml +++ b/pom.xml @@ -88,12 +88,12 @@ 1.8 - 2.5.31 + 2.5.32 1.0 4.2.0 32.1.2-jre 4.5.13 - 2.14.2 + 2.14.3 0.8.10 4.13.1 1.2.13 @@ -105,7 +105,7 @@ 1.7.36 5.1.20.RELEASE 2.1.18.RELEASE - 9.0.85 + 9.0.91 1.3.4 2.12.2 0.8.0 From 10a56c2de33afb96a62a1191e03a1fb95ab486a1 Mon Sep 17 00:00:00 2001 From: Dmytro Bezruk Date: Fri, 12 Jul 2024 15:33:27 +0300 Subject: [PATCH 02/21] [CRQ-38890] - SCA Updates. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index c47a1e46..d67e3d7f 100644 --- a/pom.xml +++ b/pom.xml @@ -98,8 +98,8 @@ 4.13.1 1.2.13 2.24.0 - 2.12.11 - 1.1.1 + 2.12.19 + 1.1.2 3.0.8 3.1.0 1.7.36 From fe60bce4cee953dcec14bae08dba4af1cfed4484 Mon Sep 17 00:00:00 2001 From: Dmytro Bezruk Date: Fri, 12 Jul 2024 16:13:42 +0300 Subject: [PATCH 03/21] Revert "[CRQ-38890] - SCA Updates." This reverts commit 10a56c2de33afb96a62a1191e03a1fb95ab486a1. --- pom.xml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index d67e3d7f..c47a1e46 100644 --- a/pom.xml +++ b/pom.xml @@ -98,8 +98,8 @@ 4.13.1 1.2.13 2.24.0 - 2.12.19 - 1.1.2 + 2.12.11 + 1.1.1 3.0.8 3.1.0 1.7.36 From 10f8021548bfab0cd9578cc42c4430162b60d7af Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers Date: Fri, 12 Jul 2024 16:41:11 +0000 Subject: [PATCH 04/21] [maven-release-plugin] prepare release release/2.9/2.9.16 --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_client_tracing/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index 5bfdb4da..c0d5d3ce 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_api diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index de9aad20..fdc1afb0 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 4.0.0 diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index 2bdf5868..ccbaf841 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ com.sdl odata - 2.9-SNAPSHOT + 2.9.16 odata_checkstyle - 2.9-SNAPSHOT + 2.9.16 jar OData Checkstyle diff --git a/odata_client/pom.xml b/odata_client/pom.xml index 18efa309..70389010 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_client diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index d067d0b4..8d63c763 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_client_api diff --git a/odata_client_tracing/pom.xml b/odata_client_tracing/pom.xml index 72799629..aa37136c 100644 --- a/odata_client_tracing/pom.xml +++ b/odata_client_tracing/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 4.0.0 diff --git a/odata_common/pom.xml b/odata_common/pom.xml index ee51f754..42e7d6bd 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_common diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index f599ca27..c443a723 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_controller diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index 9a466cf3..fc2cecb6 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_edm diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index cf1a68d8..c95b68fc 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_parser diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index 688c42d9..dfa28739 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_processor diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index 0f567d1d..f65bf106 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_renderer diff --git a/odata_service/pom.xml b/odata_service/pom.xml index c9e3db47..f3604ace 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_service diff --git a/odata_test/pom.xml b/odata_test/pom.xml index f6015d57..2745c88e 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_test diff --git a/odata_war/pom.xml b/odata_war/pom.xml index 0c5dbc84..fc4d787c 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_war diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index c988aa4e..27bafa50 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9-SNAPSHOT + 2.9.16 odata_webservice diff --git a/pom.xml b/pom.xml index c47a1e46..260af05d 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.sdl odata - 2.9-SNAPSHOT + 2.9.16 pom Tridion OData v4 Framework @@ -73,7 +73,7 @@ scm:git:git@github.com:sdl/odata.git scm:git:git@github.com:sdl/odata.git git@github.com:sdl/odata.git - HEAD + release/2.9/2.9.16 From 562d5df800a6895d2d12a0300006661616079d71 Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers Date: Fri, 12 Jul 2024 16:41:14 +0000 Subject: [PATCH 05/21] [maven-release-plugin] prepare for next development iteration --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_client_tracing/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index c0d5d3ce..5bfdb4da 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_api diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index fdc1afb0..de9aad20 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT 4.0.0 diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index ccbaf841..2bdf5868 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ com.sdl odata - 2.9.16 + 2.9-SNAPSHOT odata_checkstyle - 2.9.16 + 2.9-SNAPSHOT jar OData Checkstyle diff --git a/odata_client/pom.xml b/odata_client/pom.xml index 70389010..18efa309 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_client diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index 8d63c763..d067d0b4 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_client_api diff --git a/odata_client_tracing/pom.xml b/odata_client_tracing/pom.xml index aa37136c..72799629 100644 --- a/odata_client_tracing/pom.xml +++ b/odata_client_tracing/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT 4.0.0 diff --git a/odata_common/pom.xml b/odata_common/pom.xml index 42e7d6bd..ee51f754 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_common diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index c443a723..f599ca27 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_controller diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index fc2cecb6..9a466cf3 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_edm diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index c95b68fc..cf1a68d8 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_parser diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index dfa28739..688c42d9 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_processor diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index f65bf106..0f567d1d 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_renderer diff --git a/odata_service/pom.xml b/odata_service/pom.xml index f3604ace..c9e3db47 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_service diff --git a/odata_test/pom.xml b/odata_test/pom.xml index 2745c88e..f6015d57 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_test diff --git a/odata_war/pom.xml b/odata_war/pom.xml index fc4d787c..0c5dbc84 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_war diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index 27bafa50..c988aa4e 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.9.16 + 2.9-SNAPSHOT odata_webservice diff --git a/pom.xml b/pom.xml index 260af05d..c47a1e46 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.sdl odata - 2.9.16 + 2.9-SNAPSHOT pom Tridion OData v4 Framework @@ -73,7 +73,7 @@ scm:git:git@github.com:sdl/odata.git scm:git:git@github.com:sdl/odata.git git@github.com:sdl/odata.git - release/2.9/2.9.16 + HEAD From a53413d8bd000c1cbeee6bae3c190fac34996cda Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers Date: Mon, 17 Mar 2025 19:11:25 +0000 Subject: [PATCH 06/21] [maven-release-plugin] prepare release release/2.12/2.12.7 --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_client_tracing/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index 2bc8b610..20b86e07 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_api diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index 08036a7d..1f63bf8e 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 4.0.0 diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index 359282cf..98273f15 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ com.sdl odata - 2.12-SNAPSHOT + 2.12.7 odata_checkstyle - 2.12-SNAPSHOT + 2.12.7 jar OData Checkstyle diff --git a/odata_client/pom.xml b/odata_client/pom.xml index 3d0c60f6..dd6a5ffb 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_client diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index d9091859..eae0a355 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_client_api diff --git a/odata_client_tracing/pom.xml b/odata_client_tracing/pom.xml index 6da70695..d4bd1e59 100644 --- a/odata_client_tracing/pom.xml +++ b/odata_client_tracing/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 4.0.0 diff --git a/odata_common/pom.xml b/odata_common/pom.xml index f24c0ffd..90057f5d 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_common diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index 6479c1da..aabc454e 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_controller diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index b0fa1625..760f718f 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_edm diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index e4837c2d..8d2d9379 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_parser diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index df08deef..031e7804 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_processor diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index 1d5e51c3..4d3c263d 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_renderer diff --git a/odata_service/pom.xml b/odata_service/pom.xml index d931018d..33a8261c 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_service diff --git a/odata_test/pom.xml b/odata_test/pom.xml index 6d014563..210e1880 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_test diff --git a/odata_war/pom.xml b/odata_war/pom.xml index f98d52c7..f2107a76 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_war diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index 6490350a..0bbc926a 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12-SNAPSHOT + 2.12.7 odata_webservice diff --git a/pom.xml b/pom.xml index f0c9aca0..c00f7f07 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.sdl odata - 2.12-SNAPSHOT + 2.12.7 pom Tridion OData v4 Framework @@ -73,7 +73,7 @@ scm:git:git@github.com:sdl/odata.git scm:git:git@github.com:sdl/odata.git git@github.com:sdl/odata.git - HEAD + release/2.12/2.12.7 From 8c6aba816a02223ac1c536882c4155b04791bf87 Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers Date: Mon, 17 Mar 2025 19:11:26 +0000 Subject: [PATCH 07/21] [maven-release-plugin] prepare for next development iteration --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_client_tracing/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 17 files changed, 19 insertions(+), 19 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index 20b86e07..2bc8b610 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_api diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index 1f63bf8e..08036a7d 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT 4.0.0 diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index 98273f15..359282cf 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ com.sdl odata - 2.12.7 + 2.12-SNAPSHOT odata_checkstyle - 2.12.7 + 2.12-SNAPSHOT jar OData Checkstyle diff --git a/odata_client/pom.xml b/odata_client/pom.xml index dd6a5ffb..3d0c60f6 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_client diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index eae0a355..d9091859 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_client_api diff --git a/odata_client_tracing/pom.xml b/odata_client_tracing/pom.xml index d4bd1e59..6da70695 100644 --- a/odata_client_tracing/pom.xml +++ b/odata_client_tracing/pom.xml @@ -20,7 +20,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT 4.0.0 diff --git a/odata_common/pom.xml b/odata_common/pom.xml index 90057f5d..f24c0ffd 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_common diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index aabc454e..6479c1da 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_controller diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index 760f718f..b0fa1625 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_edm diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index 8d2d9379..e4837c2d 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_parser diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index 031e7804..df08deef 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_processor diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index 4d3c263d..1d5e51c3 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_renderer diff --git a/odata_service/pom.xml b/odata_service/pom.xml index 33a8261c..d931018d 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_service diff --git a/odata_test/pom.xml b/odata_test/pom.xml index 210e1880..6d014563 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_test diff --git a/odata_war/pom.xml b/odata_war/pom.xml index f2107a76..f98d52c7 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_war diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index 0bbc926a..6490350a 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ odata com.sdl - 2.12.7 + 2.12-SNAPSHOT odata_webservice diff --git a/pom.xml b/pom.xml index c00f7f07..f0c9aca0 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ com.sdl odata - 2.12.7 + 2.12-SNAPSHOT pom Tridion OData v4 Framework @@ -73,7 +73,7 @@ scm:git:git@github.com:sdl/odata.git scm:git:git@github.com:sdl/odata.git git@github.com:sdl/odata.git - release/2.12/2.12.7 + HEAD From 906e4a8ec1196da753f9b99a531aeacf15d39251 Mon Sep 17 00:00:00 2001 From: Maxim Chireychik Date: Mon, 1 Dec 2025 16:13:43 +0200 Subject: [PATCH 08/21] UDP-11407: Updated Spring Boot with openrewrite --- .../odata/util/edm/EntityDataModelUtil.java | 12 +- .../client/AbstractODataClientQuery.java | 3 +- .../AbstractODataFunctionClientQuery.java | 4 +- .../odata/client/ActionImportClientQuery.java | 8 +- .../odata/client/BasicODataClientQuery.java | 10 +- .../client/BoundFunctionClientQuery.java | 4 +- .../client/FunctionImportClientQuery.java | 4 +- .../caller/BasicEndpointCallerTest.java | 3 - .../client/util/MarshallingTestUtilities.java | 2 +- odata_client_tracing/pom.xml | 95 ------- .../client/caller/TracingEndpointCaller.java | 228 ----------------- .../caller/TracingEndpointCallerTest.java | 238 ------------------ .../src/test/resources/application.properties | 19 -- .../src/test/resources/response.xml | 40 --- .../AnnotationEntityDataModelFactory.java | 2 +- .../edm/model/StructuralPropertyImpl.java | 8 +- .../sdl/odata/parser/ParserLogicalTest.java | 12 +- .../parser/ParserQueryFunctionsTest.java | 3 +- .../parser/extra/ExpressionParserTest.java | 3 +- .../write/ActionPostMethodHandler.java | 4 +- .../processor/write/PostMethodHandler.java | 4 +- .../processor/write/PutMethodHandler.java | 4 +- .../processor/write/WriteMethodHandler.java | 22 +- .../processor/write/util/WriteMethodUtil.java | 22 +- .../com/sdl/odata/ODataRendererUtils.java | 2 +- .../renderer/AbstractPropertyWriter.java | 2 +- .../sdl/odata/renderer/AbstractRenderer.java | 2 +- .../atom/writer/AtomMetadataWriter.java | 14 +- .../renderer/atom/writer/AtomWriter.java | 22 +- .../json/writer/JsonPropertyWriter.java | 2 +- .../writer/JsonServiceDocumentWriter.java | 8 +- .../renderer/json/writer/JsonWriter.java | 21 +- .../MetadataDocumentPropertyWriter.java | 3 +- .../renderer/xml/util/XMLWriterUtil.java | 8 +- .../xml/writer/XMLPropertyWriter.java | 2 +- .../unmarshaller/atom/ODataAtomParser.java | 26 +- .../renderer/atom/writer/AtomWriterTest.java | 4 +- .../renderer/json/writer/JsonWriterTest.java | 4 +- odata_service/pom.xml | 1 + odata_war/src/main/webapp/WEB-INF/web.xml | 6 +- pom.xml | 43 +--- 41 files changed, 140 insertions(+), 784 deletions(-) delete mode 100644 odata_client_tracing/pom.xml delete mode 100644 odata_client_tracing/src/main/java/com/sdl/odata/client/caller/TracingEndpointCaller.java delete mode 100644 odata_client_tracing/src/test/java/com/sdl/odata/client/caller/TracingEndpointCallerTest.java delete mode 100644 odata_client_tracing/src/test/resources/application.properties delete mode 100644 odata_client_tracing/src/test/resources/response.xml diff --git a/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java b/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java index 7084c76a..cda4e7a4 100644 --- a/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java +++ b/odata_api/src/main/java/com/sdl/odata/util/edm/EntityDataModelUtil.java @@ -417,8 +417,8 @@ public static StructuralProperty getStructuralProperty(EntityDataModel entityDat String baseTypeName = structuredType.getBaseTypeName(); if (!isNullOrEmpty(baseTypeName)) { Type baseType = entityDataModel.getType(baseTypeName); - if (baseType != null && baseType instanceof StructuredType) { - return getStructuralProperty(entityDataModel, (StructuredType) baseType, propertyName); + if (baseType != null && baseType instanceof StructuredType type) { + return getStructuralProperty(entityDataModel, type, propertyName); } } } @@ -731,7 +731,7 @@ public static String formatEntityKey(EntityDataModel entityDataModel, Object ent } else if (keyPropertyRefs.size() > 1) { List processedKeys = new ArrayList<>(); for (PropertyRef propertyRef : keyPropertyRefs) { - processedKeys.add(String.format("%s=%s", propertyRef.getPath(), + processedKeys.add("%s=%s".formatted(propertyRef.getPath(), getKeyValueFromPropertyRef(entityDataModel, entity, propertyRef))); } return processedKeys.stream().map(Object::toString).collect(Collectors.joining(",")); @@ -753,10 +753,10 @@ private static String getKeyValueFromPropertyRef(EntityDataModel entityDataModel Field field = entityType.getStructuralProperty(propertyRef.getPath()).getJavaField(); field.setAccessible(true); Object value = field.get(entity); - if (value instanceof String) { - return String.format("'%s'", ((String) value).replaceAll("'", "''")); + if (value instanceof String string) { + return "'%s'".formatted(string.replaceAll("'", "''")); } else if (value instanceof Period) { - return String.format("duration'%s'", value.toString()); + return "duration'%s'".formatted(value.toString()); } else { return value != null ? value.toString() : null; } diff --git a/odata_client/src/main/java/com/sdl/odata/client/AbstractODataClientQuery.java b/odata_client/src/main/java/com/sdl/odata/client/AbstractODataClientQuery.java index 11d3b924..012b7769 100644 --- a/odata_client/src/main/java/com/sdl/odata/client/AbstractODataClientQuery.java +++ b/odata_client/src/main/java/com/sdl/odata/client/AbstractODataClientQuery.java @@ -24,7 +24,6 @@ import static com.sdl.odata.util.ReferenceUtil.isNullOrEmpty; import static com.sdl.odata.util.edm.EntityDataModelUtil.pluralize; -import static java.lang.String.format; /** * Abstract implementation of ODataClientQuery. @@ -93,7 +92,7 @@ public String getEdmEntityName() { } private String appendEntityKeySuffix(String entityName) { - return entityKey == null ? entityName : format("%s(%s)", entityName, entityKey); + return entityKey == null ? entityName : "%s(%s)".formatted(entityName, entityKey); } public static T checkNotNull(T reference, Object errorMessage) { diff --git a/odata_client/src/main/java/com/sdl/odata/client/AbstractODataFunctionClientQuery.java b/odata_client/src/main/java/com/sdl/odata/client/AbstractODataFunctionClientQuery.java index c74fbaae..7ed4d80e 100644 --- a/odata_client/src/main/java/com/sdl/odata/client/AbstractODataFunctionClientQuery.java +++ b/odata_client/src/main/java/com/sdl/odata/client/AbstractODataFunctionClientQuery.java @@ -15,6 +15,7 @@ */ package com.sdl.odata.client; +import java.io.Serial; import java.io.Serializable; import java.util.Map; import java.util.stream.Collectors; @@ -26,6 +27,7 @@ public abstract class AbstractODataFunctionClientQuery extends AbstractODataClientQuery implements Serializable { + @Serial private static final long serialVersionUID = 4940192877180997595L; private String functionName; private Map functionParameterMap; @@ -54,7 +56,7 @@ protected String generateFunctionParameters() { return "(" + this.functionParameterMap.entrySet().stream() .filter(entity -> entity.getValue() != null && !entity.getValue().isEmpty()) - .map(entry -> String.format("%s=%s", entry.getKey(), entry.getValue())) + .map(entry -> "%s=%s".formatted(entry.getKey(), entry.getValue())) .collect(Collectors.joining(",")) + ")"; } diff --git a/odata_client/src/main/java/com/sdl/odata/client/ActionImportClientQuery.java b/odata_client/src/main/java/com/sdl/odata/client/ActionImportClientQuery.java index 7ce8aefd..3871e742 100644 --- a/odata_client/src/main/java/com/sdl/odata/client/ActionImportClientQuery.java +++ b/odata_client/src/main/java/com/sdl/odata/client/ActionImportClientQuery.java @@ -17,6 +17,7 @@ import com.sdl.odata.client.api.ODataActionClientQuery; +import java.io.Serial; import java.io.Serializable; import java.util.HashSet; import java.util.LinkedHashMap; @@ -31,6 +32,7 @@ public final class ActionImportClientQuery extends AbstractODataClientQuery implements ODataActionClientQuery, Serializable { + @Serial private static final long serialVersionUID = -6244730437873248702L; private final String actionName; private final String actionRequestBody; @@ -45,7 +47,7 @@ private ActionImportClientQuery(Builder builder) { ? "" : "{" + builder.actionParameterMap.entrySet() .stream() - .map(entry -> String.format("\"%s\":%s", entry.getKey(), entry.getValue())) + .map(entry -> "\"%s\":%s".formatted(entry.getKey(), entry.getValue())) .collect(Collectors.joining(",")) + "}"; this.cacheKey = calculateCacheKey(builder); @@ -90,7 +92,7 @@ public int hashCode() { @Override public String toString() { - return String.format("ActionImportClientQuery[%s]", getQuery()); + return "ActionImportClientQuery[%s]".formatted(getQuery()); } /** @@ -149,7 +151,7 @@ private String calculateCacheKey(Builder builder) { .filter(entry -> builder.omitCacheProperties .stream() .noneMatch(propertyToOmit -> entry.getKey().contains(propertyToOmit))) - .map(entry -> String.format("%s-%s", entry.getKey(), entry.getValue())) + .map(entry -> "%s-%s".formatted(entry.getKey(), entry.getValue())) .collect(Collectors.joining(":")); return actionName + ":" + requestParametersKey; } diff --git a/odata_client/src/main/java/com/sdl/odata/client/BasicODataClientQuery.java b/odata_client/src/main/java/com/sdl/odata/client/BasicODataClientQuery.java index 9dd1bd27..0cbf0020 100644 --- a/odata_client/src/main/java/com/sdl/odata/client/BasicODataClientQuery.java +++ b/odata_client/src/main/java/com/sdl/odata/client/BasicODataClientQuery.java @@ -15,6 +15,7 @@ */ package com.sdl.odata.client; +import java.io.Serial; import java.io.Serializable; import java.util.ArrayList; import java.util.Iterator; @@ -31,6 +32,7 @@ public class BasicODataClientQuery extends AbstractODataClientQuery implements Serializable { + @Serial private static final long serialVersionUID = 6603128698934052827L; private static final String EXPAND_PREFIX = "$expand="; private static final String FILTER_PREFIX = "$filter="; @@ -77,7 +79,7 @@ private StringBuilder generateParameters() { if (filterMap != null && !filterMap.isEmpty()) { parameters.append(FILTER_PREFIX); for (Map.Entry filterEntry : filterMap.entrySet()) { - parameters.append(String.format("%s eq '%s'", filterEntry.getKey(), filterEntry.getValue())); + parameters.append("%s eq '%s'".formatted(filterEntry.getKey(), filterEntry.getValue())); if (++filterParameterCounter < filterMap.size()) { parameters.append(" and "); } @@ -90,9 +92,9 @@ private StringBuilder generateParameters() { if (expandParameters != null) { parameters.append(EXPAND_PREFIX); Iterator iterator = expandParameters.iterator(); - parameters.append(String.format("%s", iterator.next())); + parameters.append("%s".formatted(iterator.next())); while (iterator.hasNext()) { - parameters.append(String.format(",%s", iterator.next())); + parameters.append(",%s".formatted(iterator.next())); } } return parameters; @@ -134,7 +136,7 @@ public int hashCode() { @Override public String toString() { - return String.format("ODataClientQuery[%s]", getQuery()); + return "ODataClientQuery[%s]".formatted(getQuery()); } /** diff --git a/odata_client/src/main/java/com/sdl/odata/client/BoundFunctionClientQuery.java b/odata_client/src/main/java/com/sdl/odata/client/BoundFunctionClientQuery.java index 5d260b55..2df8feae 100644 --- a/odata_client/src/main/java/com/sdl/odata/client/BoundFunctionClientQuery.java +++ b/odata_client/src/main/java/com/sdl/odata/client/BoundFunctionClientQuery.java @@ -17,6 +17,7 @@ import com.sdl.odata.client.api.ODataClientQuery; +import java.io.Serial; import java.io.Serializable; import java.util.LinkedHashMap; import java.util.Map; @@ -28,6 +29,7 @@ public class BoundFunctionClientQuery extends AbstractODataFunctionClientQuery implements Serializable { + @Serial private static final long serialVersionUID = -3043509213070932752L; private String boundEntityName; private String functionNameSpace; @@ -84,7 +86,7 @@ public int hashCode() { @Override public String toString() { - return String.format("ODataClientQuery[%s]", getQuery()); + return "ODataClientQuery[%s]".formatted(getQuery()); } /** diff --git a/odata_client/src/main/java/com/sdl/odata/client/FunctionImportClientQuery.java b/odata_client/src/main/java/com/sdl/odata/client/FunctionImportClientQuery.java index 25f69020..3d4ea955 100644 --- a/odata_client/src/main/java/com/sdl/odata/client/FunctionImportClientQuery.java +++ b/odata_client/src/main/java/com/sdl/odata/client/FunctionImportClientQuery.java @@ -17,6 +17,7 @@ import com.sdl.odata.client.api.ODataClientQuery; +import java.io.Serial; import java.io.Serializable; import java.util.LinkedHashMap; import java.util.Map; @@ -29,6 +30,7 @@ public class FunctionImportClientQuery extends AbstractODataFunctionClientQuery implements Serializable { + @Serial private static final long serialVersionUID = 7148567522038582230L; public FunctionImportClientQuery(Builder builder) { @@ -76,7 +78,7 @@ public int hashCode() { @Override public String toString() { - return String.format("ODataClientQuery[%s]", getQuery()); + return "ODataClientQuery[%s]".formatted(getQuery()); } /** diff --git a/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java b/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java index d396605d..30c983e6 100644 --- a/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java +++ b/odata_client/src/test/java/com/sdl/odata/client/caller/BasicEndpointCallerTest.java @@ -23,11 +23,9 @@ import com.sdl.odata.client.api.exception.ODataClientTimeout; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; import org.springframework.beans.factory.annotation.Value; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit.jupiter.SpringExtension; import java.io.BufferedReader; import java.io.IOException; @@ -53,7 +51,6 @@ /** * Integration test for {@link BasicEndpointCaller}. */ -@ExtendWith(SpringExtension.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = TestConfiguration.class) @DirtiesContext public class BasicEndpointCallerTest { diff --git a/odata_client/src/test/java/com/sdl/odata/client/util/MarshallingTestUtilities.java b/odata_client/src/test/java/com/sdl/odata/client/util/MarshallingTestUtilities.java index baa04bbf..c4c0f45a 100644 --- a/odata_client/src/test/java/com/sdl/odata/client/util/MarshallingTestUtilities.java +++ b/odata_client/src/test/java/com/sdl/odata/client/util/MarshallingTestUtilities.java @@ -203,7 +203,7 @@ private static ODataUri createODataUri(String serviceRoot, String entitySetName) public static EntityType getEntityType(EntityDataModel entityDataModel, Object entity) throws ODataEdmException { final Type type = entityDataModel.getType(entity.getClass()); if (type == null) { - String msg = String.format("Given entity %s is not found in entity data model", entity); + String msg = "Given entity %s is not found in entity data model".formatted(entity); throw new ODataEdmException(msg); } return (EntityType) type; diff --git a/odata_client_tracing/pom.xml b/odata_client_tracing/pom.xml deleted file mode 100644 index 6da70695..00000000 --- a/odata_client_tracing/pom.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - - odata - com.sdl - 2.12-SNAPSHOT - - 4.0.0 - - odata_client_tracing - OData Tracing - Tridion OData Tracing module contains EndpointCaller implementation with brave tracing into zipkin - - jar - - - ${project.basedir}/../src/license/sdl_license/header.txt - - - - - - com.sdl - odata_client_api - - - com.sdl - odata_client - test-jar - test - - - - - org.apache.httpcomponents - httpclient - - - io.zipkin.brave - brave-apache-http-interceptors - - - io.zipkin.brave - brave-spancollector-http - - - io.zipkin.reporter - zipkin-sender-urlconnection - - - - - org.springframework.boot - spring-boot - test - - - org.springframework.boot - spring-boot-starter-test - test - - - org.springframework.boot - spring-boot-starter-tomcat - test - - - org.springframework.boot - spring-boot-autoconfigure - test - - - org.springframework - spring-webmvc - test - - - diff --git a/odata_client_tracing/src/main/java/com/sdl/odata/client/caller/TracingEndpointCaller.java b/odata_client_tracing/src/main/java/com/sdl/odata/client/caller/TracingEndpointCaller.java deleted file mode 100644 index 8c00324c..00000000 --- a/odata_client_tracing/src/main/java/com/sdl/odata/client/caller/TracingEndpointCaller.java +++ /dev/null @@ -1,228 +0,0 @@ -/** - * Copyright (c) 2014-2025 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.sdl.odata.client.caller; - -import com.github.kristofa.brave.Brave; -import com.github.kristofa.brave.Sampler; -import com.github.kristofa.brave.httpclient.BraveHttpRequestInterceptor; -import com.github.kristofa.brave.httpclient.BraveHttpResponseInterceptor; -import com.sdl.odata.api.service.HeaderNames; -import com.sdl.odata.api.service.MediaType; -import com.sdl.odata.api.service.ODataRequest; -import com.sdl.odata.client.api.caller.EndpointCaller; -import com.sdl.odata.client.api.exception.ODataClientException; -import com.sdl.odata.client.api.exception.ODataClientRuntimeException; -import org.apache.http.HttpHost; -import org.apache.http.client.config.RequestConfig; -import org.apache.http.client.methods.CloseableHttpResponse; -import org.apache.http.client.methods.RequestBuilder; -import org.apache.http.entity.StringEntity; -import org.apache.http.impl.client.CloseableHttpClient; -import org.apache.http.impl.client.HttpClientBuilder; -import org.apache.http.impl.client.HttpClients; -import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; -import org.apache.http.util.EntityUtils; -import org.slf4j.Logger; -import zipkin.reporter.AsyncReporter; -import zipkin.reporter.urlconnection.URLConnectionSender; - - -import java.io.IOException; -import java.io.InputStream; -import java.net.URISyntaxException; -import java.net.URL; -import java.util.Map; -import java.util.Properties; - -import static com.sdl.odata.api.service.MediaType.ATOM_XML; -import static com.sdl.odata.api.service.MediaType.XML; -import static com.sdl.odata.client.ODataClientConstants.DefaultValues.CLIENT_PROXY_PORT_DEFAULT; -import static com.sdl.odata.client.ODataClientConstants.DefaultValues.CLIENT_TIMEOUT_DEFAULT; -import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_CONNECTION_TIMEOUT; -import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_HOST_NAME; -import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_PORT; -import static com.sdl.odata.client.property.PropertyUtils.getIntegerProperty; -import static com.sdl.odata.client.property.PropertyUtils.getStringProperty; -import static com.sdl.odata.client.util.ODataClientUtils.buildException; -import static com.sdl.odata.client.util.ODataClientUtils.closeIfNecessary; -import static com.sdl.odata.client.util.ODataClientUtils.populateRequestProperties; -import static java.net.HttpURLConnection.HTTP_BAD_REQUEST; -import static org.apache.http.util.TextUtils.isBlank; -import static org.slf4j.LoggerFactory.getLogger; - -/** - * Tracing implementation of {@link com.sdl.odata.client.api.caller.EndpointCaller}. - * Using brave to generate and send spans into zipkin. - */ -public class TracingEndpointCaller implements EndpointCaller { - - private static final Logger LOG = getLogger(TracingEndpointCaller.class); - - private static final String WRONG_URL_MESSAGE = "The URL syntax is wrong"; - private static final String REQUEST_FAILED_MESSAGE = "Cannot make a request to URL: "; - private static final String APPLICATION_PROPERTIES_FILE_NAME = "/config/application.properties"; - private static final String DEFAULT_ZIPKIN_HOSTNAME = "http://localhost:9411"; - - private CloseableHttpClient closeableHttpClient; - - public TracingEndpointCaller(Properties properties) { - Integer timeout = getIntegerProperty(properties, CLIENT_CONNECTION_TIMEOUT, CLIENT_TIMEOUT_DEFAULT); - - String proxyServerHostName = getStringProperty(properties, CLIENT_SERVICE_PROXY_HOST_NAME); - Integer proxyPort = getIntegerProperty(properties, CLIENT_SERVICE_PROXY_PORT); - Integer proxyServerPort = proxyPort == null ? CLIENT_PROXY_PORT_DEFAULT : proxyPort; - - RequestConfig config = RequestConfig.custom() - .setConnectTimeout(timeout) - .setConnectionRequestTimeout(timeout) - .setSocketTimeout(timeout) - .build(); - - HttpClientBuilder httpClientBuilder = HttpClients.custom() - .setConnectionManager(new PoolingHttpClientConnectionManager()) - .setDefaultRequestConfig(config); - if (!isBlank(proxyServerHostName) && proxyServerPort > 0) { - httpClientBuilder.setProxy(new HttpHost(proxyServerHostName, proxyServerPort)); - } - - // load application.properties to know zipkin host, service name and how often to collect spans - Properties applicationProperties = new Properties(); - try (InputStream stream = this.getClass().getResourceAsStream(APPLICATION_PROPERTIES_FILE_NAME)) { - if (stream != null) { - applicationProperties.load(stream); - } - } catch (IOException e) { - LOG.warn("'{}' file is not available in the classpath", APPLICATION_PROPERTIES_FILE_NAME); - } - - Brave brave = new Brave.Builder(applicationProperties.getProperty("spring.application.name", "cil-call")) - .traceSampler(Sampler.create( - Float.valueOf(applicationProperties.getProperty("spring.sleuth.sampler.percentage", "1.0")))) - .reporter(AsyncReporter.builder(URLConnectionSender.builder().endpoint( - applicationProperties.getProperty("spring.zipkin.baseUrl", DEFAULT_ZIPKIN_HOSTNAME)).build()) - .build()).build(); - - closeableHttpClient = httpClientBuilder - .addInterceptorFirst(BraveHttpRequestInterceptor.builder(brave).build()) - //new BraveHttpRequestInterceptor(brave.clientRequestInterceptor(), - //new DefaultSpanNameProvider())) - .addInterceptorFirst(BraveHttpResponseInterceptor.builder(brave).build()) - //new BraveHttpResponseInterceptor(brave.clientResponseInterceptor())) - .build(); - } - - @Override - public String callEndpoint(Map requestProperties, URL url) throws ODataClientException { - LOG.debug("Preparing the call endpoint for given url: {}", url); - - CloseableHttpResponse closeableResponse = null; - try { - RequestBuilder requestBuilder = RequestBuilder.get() - .setUri(url.toURI()); - getRequestHeaders(requestProperties, -1, null, XML).entrySet().stream() - .forEach(entry -> requestBuilder.addHeader(entry.getKey(), entry.getValue())); - closeableResponse = closeableHttpClient.execute(requestBuilder.build()); - String response = EntityUtils.toString(closeableResponse.getEntity(), "UTF-8"); - - if (closeableResponse.getStatusLine().getStatusCode() >= HTTP_BAD_REQUEST) { - throw buildException(response, closeableResponse.getStatusLine().getStatusCode()); - } - return response; - } catch (URISyntaxException e) { - throw new ODataClientException(WRONG_URL_MESSAGE, e); - } catch (IOException e) { - throw new ODataClientRuntimeException(REQUEST_FAILED_MESSAGE + url, e); - } finally { - closeIfNecessary(closeableResponse); - } - } - - @Override - public InputStream getInputStream(Map requestProperties, URL url) throws ODataClientException { - LOG.debug("Preparing for getting an input stream by calling endpoint for given url: {}", url); - - try { - RequestBuilder requestBuilder = RequestBuilder.get().setUri(url.toURI()); - requestProperties.entrySet().stream() - .forEach(entry -> requestBuilder.addHeader(entry.getKey(), entry.getValue())); - CloseableHttpResponse closeableResponse = closeableHttpClient.execute(requestBuilder.build()); - - if (closeableResponse.getStatusLine().getStatusCode() >= HTTP_BAD_REQUEST) { - throw buildException(EntityUtils.toString(closeableResponse.getEntity(), "UTF-8"), - closeableResponse.getStatusLine().getStatusCode()); - } - return closeableResponse.getEntity().getContent(); - } catch (URISyntaxException e) { - throw new ODataClientException(WRONG_URL_MESSAGE + url, e); - } catch (IOException e) { - throw new ODataClientRuntimeException(REQUEST_FAILED_MESSAGE + url, e); - } - } - - @Override - public String doPostEntity(Map requestProperties, URL url, String body, - MediaType contentType, MediaType acceptType) throws ODataClientException { - return sendRequest(getRequestHeaders(requestProperties, body.length(), contentType, acceptType), - url, body, ODataRequest.Method.POST.name()); - } - - @Override - public String doPutEntity(Map requestProperties, URL url, String body, MediaType type) - throws ODataClientException { - return sendRequest(getRequestHeaders(requestProperties, body.length(), type, type), - url, body, ODataRequest.Method.PUT.name()); - } - - @Override - public void doDeleteEntity(Map requestProperties, URL url) throws ODataClientException { - sendRequest(getRequestHeaders(requestProperties, 0, ATOM_XML, ATOM_XML), url, "", - ODataRequest.Method.DELETE.name()); - } - - private Map getRequestHeaders( - Map requestProperties, int bodyLength, MediaType contentType, MediaType acceptType) { - Map headers = populateRequestProperties(requestProperties, bodyLength, contentType, acceptType); - headers.remove(HeaderNames.CONTENT_LENGTH); - return headers; - } - - private String sendRequest(Map properties, URL url, String body, String requestMethod) - throws ODataClientException { - LOG.debug("Preparing to make a {} request for given url: {}", requestMethod, url); - - CloseableHttpResponse closeableResponse = null; - try { - RequestBuilder requestBuilder = RequestBuilder.create(requestMethod) - .setUri(url.toURI()) - .setEntity(new StringEntity(body)); - properties.entrySet().stream() - .forEach(entry -> requestBuilder.addHeader(entry.getKey(), entry.getValue())); - closeableResponse = closeableHttpClient.execute(requestBuilder.build()); - String response = EntityUtils.toString(closeableResponse.getEntity(), "UTF-8"); - - if (closeableResponse.getStatusLine().getStatusCode() >= HTTP_BAD_REQUEST) { - throw buildException(response, closeableResponse.getStatusLine().getStatusCode()); - } - return response; - } catch (URISyntaxException e) { - throw new ODataClientException(WRONG_URL_MESSAGE + url, e); - } catch (IOException e) { - throw new ODataClientRuntimeException(REQUEST_FAILED_MESSAGE + url, e); - } finally { - closeIfNecessary(closeableResponse); - } - } -} diff --git a/odata_client_tracing/src/test/java/com/sdl/odata/client/caller/TracingEndpointCallerTest.java b/odata_client_tracing/src/test/java/com/sdl/odata/client/caller/TracingEndpointCallerTest.java deleted file mode 100644 index b2b14b9c..00000000 --- a/odata_client_tracing/src/test/java/com/sdl/odata/client/caller/TracingEndpointCallerTest.java +++ /dev/null @@ -1,238 +0,0 @@ -/** - * Copyright (c) 2014-2025 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -package com.sdl.odata.client.caller; - -import com.sdl.odata.client.URLTestUtils; -import com.sdl.odata.client.api.caller.EndpointCaller; -import com.sdl.odata.client.api.exception.ODataClientException; -import com.sdl.odata.client.api.exception.ODataClientHttpError; -import com.sdl.odata.client.api.exception.ODataClientNotAuthorized; -import com.sdl.odata.client.api.exception.ODataClientRuntimeException; -import com.sdl.odata.client.api.exception.ODataClientTimeout; -import org.junit.jupiter.api.BeforeEach; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; -import org.junit.jupiter.api.extension.ExtendWith; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.boot.test.context.SpringBootTest; -import org.springframework.test.annotation.DirtiesContext; -import org.springframework.test.context.junit.jupiter.SpringExtension; - -import java.io.BufferedReader; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.net.MalformedURLException; -import java.net.URL; -import java.util.Properties; - -import static com.sdl.odata.api.service.MediaType.JSON; -import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_HOST_NAME; -import static com.sdl.odata.client.ODataClientConstants.WebService.CLIENT_SERVICE_PROXY_PORT; -import static java.net.HttpURLConnection.HTTP_CLIENT_TIMEOUT; -import static java.net.HttpURLConnection.HTTP_FORBIDDEN; -import static java.net.HttpURLConnection.HTTP_UNAUTHORIZED; -import static java.util.Collections.emptyMap; -import static java.util.Collections.singletonMap; -import static org.junit.jupiter.api.Assertions.assertEquals; -import static org.junit.jupiter.api.Assertions.assertThrows; -import static org.springframework.http.MediaType.APPLICATION_JSON_VALUE; - -/** - * Integration test for {@link TracingEndpointCaller}. - */ -@Disabled -@ExtendWith(SpringExtension.class) -@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = TestConfiguration.class) -@DirtiesContext -public class TracingEndpointCallerTest { - - private static final String RESPONSE = "/response.xml"; - - private final EndpointCaller caller = new TracingEndpointCaller(new Properties()); - - @Value("${local.server.port}") - private int port; - - private String basePath; - - @BeforeEach - public void init() { - basePath = "http://127.0.0.1:" + port; - } - - @Test - public void callEndpoint() throws ODataClientException, MalformedURLException { - String response = caller.callEndpoint(singletonMap("Accept", APPLICATION_JSON_VALUE), - new URL(basePath + RESPONSE)); - String expected = URLTestUtils.loadTextFile(RESPONSE); - response = response.replace("\n", "").replace("\r", ""); - expected = expected.replace("\n", "").replace("\r", ""); - assertEquals(expected, response); - } - - @Test - public void callEndpointWithoutResponse() { - assertThrows(ODataClientHttpError.class, () -> - caller.callEndpoint(singletonMap("Accept", APPLICATION_JSON_VALUE), new URL(basePath)) - ); - } - - @Test - public void getInputStream() throws ODataClientException, IOException { - InputStream stream = caller.getInputStream( - singletonMap("Accept", APPLICATION_JSON_VALUE), new URL(basePath + RESPONSE)); - StringBuilder sb = new StringBuilder(); - try (BufferedReader reader = new BufferedReader(new InputStreamReader(stream))) { - String line; - while ((line = reader.readLine()) != null) { - sb.append(line).append(System.lineSeparator()); - } - } - assertEquals(URLTestUtils.loadTextFile(RESPONSE), sb.toString()); - } - - @Test - public void testEmptyProxyPortNumber() throws ODataClientException, MalformedURLException { - Properties properties = new Properties(); - properties.setProperty(CLIENT_SERVICE_PROXY_PORT, ""); - - EndpointCaller proxifiedCaller = new TracingEndpointCaller(properties); - String response = proxifiedCaller.callEndpoint(emptyMap(), new URL(basePath + RESPONSE)); - String result = URLTestUtils.loadTextFile(RESPONSE); - - response = response.replace("\n", "").replace("\r", ""); - result = result.replace("\n", "").replace("\r", ""); - assertEquals(result, response); - } - - @Test - public void unauthorizedPostEntity() { - assertThrows(ODataClientNotAuthorized.class, () -> - caller.doPostEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN), "", JSON, JSON) - ); - } - - @Test - public void forbiddenPostEntity() { - assertThrows(ODataClientHttpError.class, () -> - caller.doPostEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN), "", JSON, JSON) - ); - } - - @Test - public void timeoutPostEntity() { - assertThrows(ODataClientTimeout.class, () -> - caller.doPostEntity(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT), "", JSON, JSON) - ); - } - - @Test - public void okPutEntity() throws MalformedURLException, ODataClientException { - String body = URLTestUtils.loadTextFile(RESPONSE); - String result = caller.doPutEntity(emptyMap(), new URL(basePath + RESPONSE), body, JSON); - body = body.replace("\n", "").replace("\r", ""); - result = result.replace("\n", "").replace("\r", ""); - assertEquals(result, body); - } - - @Test - public void unauthorizedPutEntity() { - assertThrows(ODataClientNotAuthorized.class, () -> - caller.doPutEntity(emptyMap(), buildUrlToCall(HTTP_UNAUTHORIZED), "", JSON) - ); - } - - @Test - public void forbiddenPutEntity() { - assertThrows(ODataClientHttpError.class, () -> - caller.doPutEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN), "", JSON) - ); - } - - @Test - public void timeoutPutEntity() { - assertThrows(ODataClientTimeout.class, () -> - caller.doPutEntity(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT), "", JSON) - ); - } - - @Test - public void unauthorizedDeleteEntity() { - assertThrows(ODataClientNotAuthorized.class, () -> - caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_UNAUTHORIZED)) - ); - } - - @Test - public void forbiddenDeleteEntity() { - assertThrows(ODataClientHttpError.class, () -> - caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN)) - ); - } - - @Test - public void timeoutDeleteEntity() { - assertThrows(ODataClientTimeout.class, () -> - caller.doDeleteEntity(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT)) - ); - } - - @Test - public void unauthorizedGet() { - assertThrows(ODataClientNotAuthorized.class, () -> - caller.callEndpoint(emptyMap(), buildUrlToCall(HTTP_UNAUTHORIZED)) - ); - } - - @Test - public void forbiddenGet() { - assertThrows(ODataClientHttpError.class, () -> - caller.callEndpoint(emptyMap(), buildUrlToCall(HTTP_FORBIDDEN)) - ); - } - - @Test - public void timeoutGet() { - assertThrows(ODataClientTimeout.class, () -> - caller.callEndpoint(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT)) - ); - } - - @Test - public void timeoutInputStream() { - assertThrows(ODataClientTimeout.class, () -> - caller.getInputStream(emptyMap(), buildUrlToCall(HTTP_CLIENT_TIMEOUT)) - ); - } - - @Test - public void testIOExceptionOnOpenConnection() throws IOException { - URL ioExceptionOnConnectUrl = URLTestUtils.getIOExceptionThrowingUrl(true); - Properties properties = new Properties(); - properties.setProperty(CLIENT_SERVICE_PROXY_HOST_NAME, "localhost"); - properties.setProperty(CLIENT_SERVICE_PROXY_PORT, "9999"); - EndpointCaller proxifiedCaller = new TracingEndpointCaller(properties); - - assertThrows(ODataClientRuntimeException.class, () -> - proxifiedCaller.callEndpoint(emptyMap(), ioExceptionOnConnectUrl) - ); - } - - private URL buildUrlToCall(int code) throws MalformedURLException { - return new URL(basePath + "/" + code); - } -} diff --git a/odata_client_tracing/src/test/resources/application.properties b/odata_client_tracing/src/test/resources/application.properties deleted file mode 100644 index 37edf157..00000000 --- a/odata_client_tracing/src/test/resources/application.properties +++ /dev/null @@ -1,19 +0,0 @@ -# -# Copyright (c) 2014-2021 All Rights Reserved by the RWS Group for and on behalf of its affiliates and subsidiaries. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -spring.zipkin.baseUrl=http://localhost:9411 -spring.sleuth.sampler.percentage=1.0 -spring.application.name=your-service-name diff --git a/odata_client_tracing/src/test/resources/response.xml b/odata_client_tracing/src/test/resources/response.xml deleted file mode 100644 index 307569af..00000000 --- a/odata_client_tracing/src/test/resources/response.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - http://localhost:8080/odata.svc/$metadata#Article('artid') - - <summary/> - <updated>2014-08-11T10:00:00Z</updated> - <author> - <name/> - </author> - <link rel="edit" title="Article" href="Articles('artid')"/> - <category term="#SDL.Article" - scheme="http://docs.oasis-open.org/odata/ns/scheme"/> - <content type="application/xml"> - <m:properties> - <d:id>artid</d:id> - <d:Name>article1_name</d:Name> - </m:properties> - </content> -</entry> \ No newline at end of file diff --git a/odata_edm/src/main/java/com/sdl/odata/edm/factory/annotations/AnnotationEntityDataModelFactory.java b/odata_edm/src/main/java/com/sdl/odata/edm/factory/annotations/AnnotationEntityDataModelFactory.java index 45badcae..1e443971 100644 --- a/odata_edm/src/main/java/com/sdl/odata/edm/factory/annotations/AnnotationEntityDataModelFactory.java +++ b/odata_edm/src/main/java/com/sdl/odata/edm/factory/annotations/AnnotationEntityDataModelFactory.java @@ -238,7 +238,7 @@ public StructuredType getStructuredType(String fullyQualifiedTypeName) { Schema schema = schemas.get(namespace); if (schema != null) { Type type = schema.getType(simpleTypeName); - return type instanceof StructuredType ? (StructuredType) type : null; + return type instanceof StructuredType st ? st : null; } else { return null; } diff --git a/odata_edm/src/main/java/com/sdl/odata/edm/model/StructuralPropertyImpl.java b/odata_edm/src/main/java/com/sdl/odata/edm/model/StructuralPropertyImpl.java index 291cb537..ad9e217f 100644 --- a/odata_edm/src/main/java/com/sdl/odata/edm/model/StructuralPropertyImpl.java +++ b/odata_edm/src/main/java/com/sdl/odata/edm/model/StructuralPropertyImpl.java @@ -98,11 +98,11 @@ public B setTypeFromJavaField(Field field, TypeNameResolver resolver) { private Class<?> getCollectionElementType(Field field) { // Reflection magic to determine the element type of a collection type java.lang.reflect.Type genericType = field.getGenericType(); - if (genericType instanceof ParameterizedType) { + if (genericType instanceof ParameterizedType type) { java.lang.reflect.Type[] actualTypeArguments = - ((ParameterizedType) genericType).getActualTypeArguments(); - if (actualTypeArguments.length > 0 && actualTypeArguments[0] instanceof Class) { - return (Class<?>) actualTypeArguments[0]; + type.getActualTypeArguments(); + if (actualTypeArguments.length > 0 && actualTypeArguments[0] instanceof Class<?> class1) { + return class1; } } diff --git a/odata_parser/src/test/java/com/sdl/odata/parser/ParserLogicalTest.java b/odata_parser/src/test/java/com/sdl/odata/parser/ParserLogicalTest.java index af7b43fc..9f9bfb11 100644 --- a/odata_parser/src/test/java/com/sdl/odata/parser/ParserLogicalTest.java +++ b/odata_parser/src/test/java/com/sdl/odata/parser/ParserLogicalTest.java @@ -57,7 +57,7 @@ public void testLogicalNegation() throws ODataException { @Test public void testLogicalAnd() throws ODataException { - ODataUri uri = parser.parseUri(SERVICE_ROOT + String.format(URI, "and"), model); + ODataUri uri = parser.parseUri(SERVICE_ROOT + URI.formatted("and"), model); FilterOption option = getSingleOption(uri); assertTrue(option.expression() instanceof AndExpr); AndExpr expr = (AndExpr) option.expression(); @@ -67,7 +67,7 @@ public void testLogicalAnd() throws ODataException { @Test public void testLogicalOr() throws ODataException { - ODataUri uri = parser.parseUri(SERVICE_ROOT + String.format(URI, "or"), model); + ODataUri uri = parser.parseUri(SERVICE_ROOT + URI.formatted("or"), model); FilterOption option = getSingleOption(uri); assertTrue(option.expression() instanceof OrExpr); @@ -76,7 +76,7 @@ public void testLogicalOr() throws ODataException { } private void testWithStringFunctions(String boolMethod) throws ODataException { - ODataUri uri = parser.parseUri(SERVICE_ROOT + String.format(QUERY_URI, boolMethod), model); + ODataUri uri = parser.parseUri(SERVICE_ROOT + QUERY_URI.formatted(boolMethod), model); processQueryFunction(getSingleOption(uri), boolMethod); } @@ -87,13 +87,11 @@ private void processQueryFunction(FilterOption option, String boolMethod) { Iterator iterator = args.iterator(); while (iterator.hasNext()) { Object cursor = iterator.next(); - if (cursor instanceof EntityPathExpr) { - EntityPathExpr pathExpr = (EntityPathExpr) cursor; + if (cursor instanceof EntityPathExpr pathExpr) { PropertyPathExpr path = (PropertyPathExpr) pathExpr.subPath().get(); assertEquals(boolMethod, methodCall.methodName()); assertEquals("name", path.propertyName()); - } else if (cursor instanceof LiteralExpr) { - LiteralExpr literalExpr = (LiteralExpr) cursor; + } else if (cursor instanceof LiteralExpr literalExpr) { StringLiteral stringLiteral = (StringLiteral) literalExpr.value(); assertEquals("John", stringLiteral.value()); } diff --git a/odata_parser/src/test/java/com/sdl/odata/parser/ParserQueryFunctionsTest.java b/odata_parser/src/test/java/com/sdl/odata/parser/ParserQueryFunctionsTest.java index cb8d586f..73c474f6 100644 --- a/odata_parser/src/test/java/com/sdl/odata/parser/ParserQueryFunctionsTest.java +++ b/odata_parser/src/test/java/com/sdl/odata/parser/ParserQueryFunctionsTest.java @@ -57,8 +57,7 @@ private void testQueryFunction(String operator) throws ODataException { Iterator iter = args.iterator(); while (iter.hasNext()) { Object obj = iter.next(); - if (obj instanceof EntityPathExpr) { - EntityPathExpr entityPathExpr = (EntityPathExpr) obj; + if (obj instanceof EntityPathExpr entityPathExpr) { PropertyPathExpr propertyPath = (PropertyPathExpr) entityPathExpr.subPath().get(); assertEquals("name", propertyPath.propertyName()); } diff --git a/odata_parser/src/test/java/com/sdl/odata/parser/extra/ExpressionParserTest.java b/odata_parser/src/test/java/com/sdl/odata/parser/extra/ExpressionParserTest.java index a85d93dd..4c584706 100644 --- a/odata_parser/src/test/java/com/sdl/odata/parser/extra/ExpressionParserTest.java +++ b/odata_parser/src/test/java/com/sdl/odata/parser/extra/ExpressionParserTest.java @@ -57,8 +57,7 @@ public void testEntitySetRootElement() { while (iter.hasNext()) { Object obj = iter.next(); - if (obj instanceof FilterOption) { - FilterOption option = (FilterOption) obj; + if (obj instanceof FilterOption option) { EqExpr expr = (EqExpr) option.expression(); EntityPathExpr pathExpr = (EntityPathExpr) expr.left(); diff --git a/odata_processor/src/main/java/com/sdl/odata/processor/write/ActionPostMethodHandler.java b/odata_processor/src/main/java/com/sdl/odata/processor/write/ActionPostMethodHandler.java index d8d89d13..8010d978 100644 --- a/odata_processor/src/main/java/com/sdl/odata/processor/write/ActionPostMethodHandler.java +++ b/odata_processor/src/main/java/com/sdl/odata/processor/write/ActionPostMethodHandler.java @@ -49,8 +49,8 @@ public ActionPostMethodHandler(ODataRequestContext requestContext, DataSourceFac @Override public ProcessorResult handleWrite(Object action) throws ODataException { Operation operation; - if (action instanceof Operation) { - operation = (Operation) action; + if (action instanceof Operation operation1) { + operation = operation1; Object data = operation.doOperation(getODataRequestContext(), getDataSourceFactory()); if (data == null) { return new ProcessorResult(ODataResponse.Status.NO_CONTENT); diff --git a/odata_processor/src/main/java/com/sdl/odata/processor/write/PostMethodHandler.java b/odata_processor/src/main/java/com/sdl/odata/processor/write/PostMethodHandler.java index fb1492c4..bc3e7faf 100644 --- a/odata_processor/src/main/java/com/sdl/odata/processor/write/PostMethodHandler.java +++ b/odata_processor/src/main/java/com/sdl/odata/processor/write/PostMethodHandler.java @@ -46,8 +46,8 @@ public PostMethodHandler(ODataRequestContext requestContext, DataSourceFactory d @Override public ProcessorResult handleWrite(Object entity) throws ODataException { - if (entity instanceof ODataLink) { - return processLink((ODataLink) entity); + if (entity instanceof ODataLink link) { + return processLink(link); } else { if (entity == null) { throw new ODataBadRequestException("The body of a POST request must contain a valid entity."); diff --git a/odata_processor/src/main/java/com/sdl/odata/processor/write/PutMethodHandler.java b/odata_processor/src/main/java/com/sdl/odata/processor/write/PutMethodHandler.java index 2f247f35..706d70ac 100644 --- a/odata_processor/src/main/java/com/sdl/odata/processor/write/PutMethodHandler.java +++ b/odata_processor/src/main/java/com/sdl/odata/processor/write/PutMethodHandler.java @@ -47,8 +47,8 @@ public PutMethodHandler(ODataRequestContext requestContext, DataSourceFactory da @Override public ProcessorResult handleWrite(Object entity) throws ODataException { - if (entity instanceof ODataLink) { - return processLink((ODataLink) entity); + if (entity instanceof ODataLink link) { + return processLink(link); } else { if (entity == null) { throw new ODataBadRequestException("The body of a PUT request must contain a valid entity."); diff --git a/odata_processor/src/main/java/com/sdl/odata/processor/write/WriteMethodHandler.java b/odata_processor/src/main/java/com/sdl/odata/processor/write/WriteMethodHandler.java index 35f136eb..da0daced 100644 --- a/odata_processor/src/main/java/com/sdl/odata/processor/write/WriteMethodHandler.java +++ b/odata_processor/src/main/java/com/sdl/odata/processor/write/WriteMethodHandler.java @@ -107,7 +107,7 @@ protected boolean isMinimalReturnPreferred() { protected Map<String, String> getResponseHeaders(Object entity) throws ODataEdmException { final Map<String, String> headers = new HashMap<>(); - headers.put(LOCATION, String.format("%s/%s(%s)", getoDataUri().serviceRoot(), + headers.put(LOCATION, "%s/%s(%s)".formatted(getoDataUri().serviceRoot(), getEntitySetByEntity(getEntityDataModel(), entity).getName(), formatEntityKey(getEntityDataModel(), entity))); return headers; @@ -159,17 +159,17 @@ private Map<String, Object> getKeyValues(Object entity, EntityType entityType) t private Object normalize(Object value) { - if (value instanceof Long) { - return new BigDecimal((Long) value); - } else if (value instanceof Integer) { - return new BigDecimal((Integer) value); - } else if (value instanceof Short) { - return new BigDecimal((Short) value); - } else if (value instanceof Byte) { - return new BigDecimal((Byte) value); - } else if (value instanceof scala.math.BigDecimal) { + if (value instanceof Long long1) { + return new BigDecimal(long1); + } else if (value instanceof Integer integer) { + return new BigDecimal(integer); + } else if (value instanceof Short short1) { + return new BigDecimal(short1); + } else if (value instanceof Byte byte1) { + return new BigDecimal(byte1); + } else if (value instanceof scala.math.BigDecimal decimal) { // Convert it to a Java BigDecimal - return ((scala.math.BigDecimal) value).bigDecimal(); + return decimal.bigDecimal(); } return value; diff --git a/odata_processor/src/main/java/com/sdl/odata/processor/write/util/WriteMethodUtil.java b/odata_processor/src/main/java/com/sdl/odata/processor/write/util/WriteMethodUtil.java index 5707c561..5dbcc3c0 100644 --- a/odata_processor/src/main/java/com/sdl/odata/processor/write/util/WriteMethodUtil.java +++ b/odata_processor/src/main/java/com/sdl/odata/processor/write/util/WriteMethodUtil.java @@ -99,7 +99,7 @@ public static Map<String, String> getResponseHeaders(Object entity, ODataUri oDa EntityDataModel entityDataModel) throws ODataEdmException { final Map<String, String> headers = new HashMap<>(); - headers.put(LOCATION, String.format("%s/%s(%s)", oDataUri.serviceRoot(), + headers.put(LOCATION, "%s/%s(%s)".formatted(oDataUri.serviceRoot(), getEntitySetByEntity(entityDataModel, entity).getName(), formatEntityKey(entityDataModel, entity))); return headers; @@ -152,17 +152,17 @@ private static Map<String, Object> getKeyValues(Object entity, EntityType entity private static Object normalize(Object value) { - if (value instanceof Long) { - return new BigDecimal((Long) value); - } else if (value instanceof Integer) { - return new BigDecimal((Integer) value); - } else if (value instanceof Short) { - return new BigDecimal((Short) value); - } else if (value instanceof Byte) { - return new BigDecimal((Byte) value); - } else if (value instanceof scala.math.BigDecimal) { + if (value instanceof Long long1) { + return new BigDecimal(long1); + } else if (value instanceof Integer integer) { + return new BigDecimal(integer); + } else if (value instanceof Short short1) { + return new BigDecimal(short1); + } else if (value instanceof Byte byte1) { + return new BigDecimal(byte1); + } else if (value instanceof scala.math.BigDecimal decimal) { // Convert it to a Java BigDecimal - return ((scala.math.BigDecimal) value).bigDecimal(); + return decimal.bigDecimal(); } return value; diff --git a/odata_renderer/src/main/java/com/sdl/odata/ODataRendererUtils.java b/odata_renderer/src/main/java/com/sdl/odata/ODataRendererUtils.java index 2d647701..65c21e19 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/ODataRendererUtils.java +++ b/odata_renderer/src/main/java/com/sdl/odata/ODataRendererUtils.java @@ -121,7 +121,7 @@ public static <T> T checkNotNull(T reference) { */ public static <T> T checkNotNull(T reference, String message, Object... args) { if (reference == null) { - throw new IllegalArgumentException(String.format(message, args)); + throw new IllegalArgumentException(message.formatted(args)); } return reference; } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractPropertyWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractPropertyWriter.java index a4272619..d047f05b 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractPropertyWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractPropertyWriter.java @@ -279,7 +279,7 @@ protected EntityDataModel getEntityDataModel() { } protected void defaultHandling(Type type) throws ODataRenderException { - String msg = String.format("Unhandled object type %s", type); + String msg = "Unhandled object type %s".formatted(type); LOG.warn(msg); throw new ODataRenderException(msg); } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractRenderer.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractRenderer.java index 35fc0050..ff734b10 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractRenderer.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/AbstractRenderer.java @@ -231,7 +231,7 @@ protected void checkContextURL(ODataRequestContext requestContext, Option<String if (!contextURL.isDefined()) { throw new ODataRenderException( - String.format("Not possible to create context URL for request %s", requestContext)); + "Not possible to create context URL for request %s".formatted(requestContext)); } } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomMetadataWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomMetadataWriter.java index 94c4ca28..89c54679 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomMetadataWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomMetadataWriter.java @@ -205,7 +205,7 @@ void writeFeedId(Object entity, NavigationProperty property) throws XMLStreamExc xmlWriter.writeStartElement(ATOM_ID); if (entity != null) { - xmlWriter.writeCharacters(String.format("%s/%s/%s", oDataUri.serviceRoot(), + xmlWriter.writeCharacters("%s/%s/%s".formatted(oDataUri.serviceRoot(), getEntityWithKey(entity), property.getName())); } else { String id; @@ -255,7 +255,7 @@ void writeFeedLink(Object entity, NavigationProperty property) throws XMLStreamE } } else { xmlWriter.writeAttribute(TITLE, property.getName()); - xmlWriter.writeAttribute(HREF, String.format("%s/%s", getEntityWithKey(entity), property.getName())); + xmlWriter.writeAttribute(HREF, "%s/%s".formatted(getEntityWithKey(entity), property.getName())); } xmlWriter.writeEndElement(); @@ -293,24 +293,24 @@ void writeEntryCategory(Object entity) throws XMLStreamException { Type entityType = entityDataModel.getType(entity.getClass()); xmlWriter.writeStartElement(ATOM_CATEGORY); xmlWriter.writeAttribute(SCHEME, ODATA_SCHEME_NS); - xmlWriter.writeAttribute(TERM, String.format("%s%s.%s", HASH, entityType.getNamespace(), entityType.getName())); + xmlWriter.writeAttribute(TERM, "%s%s.%s".formatted(HASH, entityType.getNamespace(), entityType.getName())); xmlWriter.writeEndElement(); } private String getEntityWithKey(Object entity) throws ODataEdmException { if (isSingletonEntity(entityDataModel, entity)) { - return String.format("%s", getEntityName(entityDataModel, entity)); + return "%s".formatted(getEntityName(entityDataModel, entity)); } else { - return String.format("%s(%s)", getEntityName(entityDataModel, entity), + return "%s(%s)".formatted(getEntityName(entityDataModel, entity), formatEntityKey(entityDataModel, entity)); } } private String getEntryIdString(Object entity) throws ODataEdmException { if (isSingletonEntity(entityDataModel, entity)) { - return String.format("%s/%s", oDataUri.serviceRoot(), getEntityName(entityDataModel, entity)); + return "%s/%s".formatted(oDataUri.serviceRoot(), getEntityName(entityDataModel, entity)); } else { - return String.format("%s/%s(%s)", oDataUri.serviceRoot(), + return "%s/%s(%s)".formatted(oDataUri.serviceRoot(), getEntityName(entityDataModel, entity), formatEntityKey(entityDataModel, entity)); } } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomWriter.java index 8937409a..d0c94938 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/atom/writer/AtomWriter.java @@ -363,16 +363,14 @@ private void writeEntry(Object entity, boolean isFeedEntry) throws XMLStreamExce metadataWriter.writeEntryEntityLink(entity); for (StructuralProperty property : entityType.getStructuralProperties()) { - if (property instanceof NavigationProperty) { + if (property instanceof NavigationProperty navigationProperty) { // Nullable navigation properties that have null values should not be included in the output of writes if (isWriteOperation) { final Object value = getPropertyValue(property, entity); if (value != null) { - NavigationProperty navigationProperty = (NavigationProperty) property; writeEntryPropertyLink(entity, navigationProperty); } } else { - NavigationProperty navigationProperty = (NavigationProperty) property; writeEntryPropertyLink(entity, navigationProperty); } } @@ -421,7 +419,7 @@ private void writeEntryPropertyLink(Object entity, NavigationProperty property) // The navigation link startLink(); xmlWriter.writeAttribute(REL, ODATA_NAVIGATION_LINK_REL_NS_PREFIX + property.getName()); - xmlWriter.writeAttribute(TYPE, String.format(linkType, ATOM_XML.toString())); + xmlWriter.writeAttribute(TYPE, linkType.formatted(ATOM_XML.toString())); xmlWriter.writeAttribute(TITLE, property.getName()); // Deep inserts allow us to create referenced entities as part of a single create entity operation. See spec: @@ -450,16 +448,16 @@ private void writeEntryPropertyLink(Object entity, NavigationProperty property) final Object value = getPropertyValue(property, entity); if (property.isCollection()) { - xmlWriter.writeAttribute(HREF, String.format("%s(%s)/%s", getEntityName(entityDataModel, entity), + xmlWriter.writeAttribute(HREF, "%s(%s)/%s".formatted(getEntityName(entityDataModel, entity), formatEntityKey(entityDataModel, entity), property.getName())); if (((Collection<?>) value).size() > 0) { writeCollectionRefs(((Collection<?>) value)); } } else if (value != null) { if (isSingletonEntity(entityDataModel, getPropertyValue(property, entity))) { - xmlWriter.writeAttribute(HREF, String.format("%s", getEntityName(entityDataModel, value))); + xmlWriter.writeAttribute(HREF, "%s".formatted(getEntityName(entityDataModel, value))); } else { - xmlWriter.writeAttribute(HREF, String.format("%s(%s)", getEntityName(entityDataModel, value), + xmlWriter.writeAttribute(HREF, "%s(%s)".formatted(getEntityName(entityDataModel, value), formatEntityKey(entityDataModel, value))); } } @@ -489,10 +487,10 @@ private void writeEntryPropertyLink(Object entity, NavigationProperty property) xmlWriter.writeAttribute(TITLE, property.getName()); if (isSingletonEntity(entityDataModel, entity)) { - xmlWriter.writeAttribute(HREF, String.format("%s/%s/$ref", + xmlWriter.writeAttribute(HREF, "%s/%s/$ref".formatted( getEntityName(entityDataModel, entity), property.getName())); } else { - xmlWriter.writeAttribute(HREF, String.format("%s(%s)/%s/$ref", getEntityName(entityDataModel, entity), + xmlWriter.writeAttribute(HREF, "%s(%s)/%s/$ref".formatted(getEntityName(entityDataModel, entity), formatEntityKey(entityDataModel, entity), property.getName())); } @@ -511,7 +509,7 @@ private void writeCollectionRefs(Collection<?> collection) throws XMLStreamExcep private void writeMetadataRef(Object entity) throws XMLStreamException, ODataEdmException { xmlWriter.writeStartElement(METADATA, REF, ""); - xmlWriter.writeAttribute(ID, String.format("%s(%s)", getEntityName(entityDataModel, entity), + xmlWriter.writeAttribute(ID, "%s(%s)".formatted(getEntityName(entityDataModel, entity), formatEntityKey(entityDataModel, entity))); xmlWriter.writeEndElement(); } @@ -534,9 +532,9 @@ private void endLink() throws XMLStreamException { private String getHrefAttributeValue(Object entity, NavigationProperty property) throws ODataEdmException { if (isSingletonEntity(entityDataModel, entity)) { - return String.format("%s/%s", getEntityName(entityDataModel, entity), property.getName()); + return "%s/%s".formatted(getEntityName(entityDataModel, entity), property.getName()); } else { - return String.format("%s(%s)/%s", getEntityName(entityDataModel, entity), + return "%s(%s)/%s".formatted(getEntityName(entityDataModel, entity), formatEntityKey(entityDataModel, entity), property.getName()); } } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonPropertyWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonPropertyWriter.java index c8d0670a..976da9e4 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonPropertyWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonPropertyWriter.java @@ -259,7 +259,7 @@ private void handleProperty(Object data, StructuralProperty property, JsonGenera LOG.trace("Property name is '{}' and its value is '{}'", property.getName(), value); Type type = getType(value); if (type == null) { - String msg = String.format("Field type %s is not found in entity data model", field.getType()); + String msg = "Field type %s is not found in entity data model".formatted(field.getType()); LOG.error(msg); throw new ODataRenderException(msg); } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java index 69b49d4c..28974f1e 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonServiceDocumentWriter.java @@ -122,8 +122,8 @@ private void writeObject(JsonGenerator jsonGenerator, Object entity) throws IOEx */ private void writeName(JsonGenerator jsonGenerator, Object entity) throws IOException { jsonGenerator.writeFieldName(NAME); - if (entity instanceof EntitySet) { - jsonGenerator.writeObject(((EntitySet) entity).getName()); + if (entity instanceof EntitySet set) { + jsonGenerator.writeObject(set.getName()); } else { jsonGenerator.writeObject(((Singleton) entity).getName()); } @@ -154,8 +154,8 @@ private void writeKind(JsonGenerator jsonGenerator, Object entity) throws IOExce private void writeURL(JsonGenerator jsonGenerator, Object entity) throws IOException { // It is exactly the same as the 'name' property. jsonGenerator.writeFieldName(URL); - if (entity instanceof EntitySet) { - jsonGenerator.writeObject(((EntitySet) entity).getName()); + if (entity instanceof EntitySet set) { + jsonGenerator.writeObject(set.getName()); } else { jsonGenerator.writeObject(((Singleton) entity).getName()); } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonWriter.java index f1db70b7..d55a0864 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/json/writer/JsonWriter.java @@ -174,7 +174,7 @@ private String writeJson(Object data, Map<String, Object> meta) throws IOExcepti jsonGenerator.writeStartObject(); // Write @odata constants - entitySet = (data instanceof List) ? getEntitySet((List<?>) data) : getEntitySet(data); + entitySet = (data instanceof List<?> l) ? getEntitySet(l) : getEntitySet(data); jsonGenerator.writeStringField(CONTEXT, contextURL); @@ -184,8 +184,8 @@ private String writeJson(Object data, Map<String, Object> meta) throws IOExcepti long count; Object countObj = meta.get("count"); - if (countObj instanceof Integer) { - count = ((Integer) countObj).longValue(); + if (countObj instanceof Integer integer) { + count = integer.longValue(); } else { count = (long) countObj; } @@ -194,16 +194,16 @@ private String writeJson(Object data, Map<String, Object> meta) throws IOExcepti if (!(data instanceof List)) { if (entitySet != null) { - jsonGenerator.writeStringField(ID, String.format("%s(%s)", getEntityName(entityDataModel, data), + jsonGenerator.writeStringField(ID, "%s(%s)".formatted(getEntityName(entityDataModel, data), formatEntityKey(entityDataModel, data))); } else { - jsonGenerator.writeStringField(ID, String.format("%s", getEntityName(entityDataModel, data))); + jsonGenerator.writeStringField(ID, "%s".formatted(getEntityName(entityDataModel, data))); } } // Write feed - if (data instanceof List) { - marshallEntities((List<?>) data); + if (data instanceof List<?> list) { + marshallEntities(list); } else { marshall(data, this.entityDataModel.getType(data.getClass())); } @@ -219,7 +219,7 @@ private void marshallEntities(List<?> entities) throws IOException, jsonGenerator.writeArrayFieldStart(VALUE); for (Object entity : entities) { jsonGenerator.writeStartObject(); - jsonGenerator.writeStringField(ID, String.format("%s(%s)", getEntityName(entityDataModel, entity), + jsonGenerator.writeStringField(ID, "%s(%s)".formatted(getEntityName(entityDataModel, entity), formatEntityKey(entityDataModel, entity))); marshall(entity, entityDataModel.getType(entity.getClass())); jsonGenerator.writeEndObject(); @@ -274,9 +274,8 @@ private void marshallStructured(final Object object, StructuredType structuredTy visitProperties(entityDataModel, structuredType, property -> { try { - if (property instanceof NavigationProperty) { + if (property instanceof NavigationProperty navProperty) { LOG.trace("Start marshalling navigation property: {}", property.getName()); - NavigationProperty navProperty = (NavigationProperty) property; if (forceExpand || isExpandedProperty(navProperty)) { final Object value = getValueFromProperty(object, navProperty); if (value != null) { @@ -324,7 +323,7 @@ private void writeODataType(StructuredType structuredType) throws IOException { String type = typeName.substring(typeName.lastIndexOf(".") + 1, typeName.length()); if (!type.equals(structuredType.getName())) { - jsonGenerator.writeStringField(TYPE, String.format("#%s.%s", + jsonGenerator.writeStringField(TYPE, "#%s.%s".formatted( structuredType.getNamespace(), structuredType.getName())); } else { LOG.trace("{} has root level. {} won't be written here", entitySet.getName(), TYPE); diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentPropertyWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentPropertyWriter.java index c6600253..6ff4d9bd 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentPropertyWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/metadata/MetadataDocumentPropertyWriter.java @@ -66,8 +66,7 @@ public void write(StructuralProperty property) throws XMLStreamException { LOG.debug("Writing property {} of type {}", property.getName(), property.getTypeName()); - if (property instanceof NavigationProperty) { - NavigationProperty navProperty = (NavigationProperty) property; + if (property instanceof NavigationProperty navProperty) { xmlWriter.writeStartElement(NAVIGATION_PROPERTY); writeCommonPropertyAttributes(property); if (!isNullOrEmpty(navProperty.getPartnerName())) { diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/util/XMLWriterUtil.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/util/XMLWriterUtil.java index dce3c910..1ad98d19 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/util/XMLWriterUtil.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/util/XMLWriterUtil.java @@ -58,8 +58,8 @@ public static String getPropertyXmlForPrimitives(String rootName, Type type, Obj try (ByteArrayOutputStream outputStream = new ByteArrayOutputStream()) { XMLStreamWriter writer = startElement(outputStream, rootName, type.getName(), context, false); // write values - if (data instanceof List<?>) { - writeMultipleElementsForPrimitives(writer, (List<?>) data); + if (data instanceof List<?> list) { + writeMultipleElementsForPrimitives(writer, list); } else { writer.writeCharacters(data.toString()); } @@ -86,8 +86,8 @@ public static void getPropertyXmlForPrimitivesBodyDocument( LOG.debug("PropertyXMLForPrimitivesBodyDocument invoked with {}, {}, {}", rootName, type, data); try { // write values - if (data instanceof List<?>) { - writeMultipleElementsForPrimitives(xmlStreamWriter, (List<?>) data); + if (data instanceof List<?> list) { + writeMultipleElementsForPrimitives(xmlStreamWriter, list); } else { xmlStreamWriter.writeCharacters(data.toString()); } diff --git a/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/writer/XMLPropertyWriter.java b/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/writer/XMLPropertyWriter.java index 32fb7d49..02b1e136 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/writer/XMLPropertyWriter.java +++ b/odata_renderer/src/main/java/com/sdl/odata/renderer/xml/writer/XMLPropertyWriter.java @@ -192,7 +192,7 @@ private void handleProperty(Object entity, StructuralProperty property, XMLStrea LOG.trace("Property name is '{}' and its value is '{}'", property.getName(), value); Type type = getType(value); if (type == null) { - String msg = String.format("Field type %s is not found in entity data model", field.getType()); + String msg = "Field type %s is not found in entity data model".formatted(field.getType()); LOG.error(msg); throw new ODataRenderException(msg); } diff --git a/odata_renderer/src/main/java/com/sdl/odata/unmarshaller/atom/ODataAtomParser.java b/odata_renderer/src/main/java/com/sdl/odata/unmarshaller/atom/ODataAtomParser.java index 77ba98a3..9e8c1d04 100644 --- a/odata_renderer/src/main/java/com/sdl/odata/unmarshaller/atom/ODataAtomParser.java +++ b/odata_renderer/src/main/java/com/sdl/odata/unmarshaller/atom/ODataAtomParser.java @@ -231,8 +231,7 @@ private void setEntityProperties(Object entity, EntityType entityType, Element e NodeList childNodes = entryElement.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node node = childNodes.item(i); - if (node instanceof Element && node.getNodeName().equals(ODATA_CONTENT)) { - Element contentElement = (Element) node; + if (node instanceof Element contentElement && node.getNodeName().equals(ODATA_CONTENT)) { NodeList propertiesElements = contentElement.getElementsByTagNameNS(getODataMetadataNS(), ODATA_PROPERTIES); @@ -242,8 +241,8 @@ private void setEntityProperties(Object entity, EntityType entityType, Element e NodeList propertyNodes = propertiesElement.getChildNodes(); for (int k = 0; k < propertyNodes.getLength(); k++) { Node propertyNode = propertyNodes.item(k); - if (propertyNode instanceof Element) { - setStructProperty(entity, entityType, (Element) propertyNode); + if (propertyNode instanceof Element element) { + setStructProperty(entity, entityType, element); } } } @@ -433,8 +432,8 @@ private Object parsePropertyValueComplex(Element propertyElement, ComplexType co NodeList nodes = propertyElement.getChildNodes(); for (int i = 0; i < nodes.getLength(); i++) { Node node = nodes.item(i); - if (node instanceof Element) { - setStructProperty(instance, complexType, (Element) node); + if (node instanceof Element element) { + setStructProperty(instance, complexType, element); } } @@ -451,8 +450,7 @@ private void setEntityNavigationProperties(Object entity, EntityType entityType, NodeList childNodes = entryElement.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node node = childNodes.item(i); - if (node instanceof Element && node.getNodeName().equals(ATOM_LINK)) { - Element linkElement = (Element) node; + if (node instanceof Element linkElement && node.getNodeName().equals(ATOM_LINK)) { String relAttribute = (linkElement.getAttribute(REL) == null) ? "" : linkElement.getAttribute(REL); if (relAttribute.startsWith(getODataNavLinkRelationNSPrefix())) { foundNavigationProperties.add(processNavigationLink(entity, entityType, linkElement)); @@ -585,8 +583,8 @@ private List<Element> getFeedEntries(Element feedElement) { NodeList childNodes = feedElement.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node node = childNodes.item(i); - if (node instanceof Element && ATOM_ENTRY.equals(node.getLocalName())) { - feedEntries.add((Element) node); + if (node instanceof Element element && ATOM_ENTRY.equals(node.getLocalName())) { + feedEntries.add(element); } } return feedEntries; @@ -597,8 +595,8 @@ private List<Element> getFeedMetadataRefs(Element feedElement) { NodeList childNodes = feedElement.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node node = childNodes.item(i); - if (node instanceof Element && REF.equals(node.getLocalName())) { - feedEntries.add((Element) node); + if (node instanceof Element element && REF.equals(node.getLocalName())) { + feedEntries.add(element); } } return feedEntries; @@ -639,8 +637,8 @@ private Element getFirstChildElement(Element element) { NodeList childNodes = element.getChildNodes(); for (int i = 0; i < childNodes.getLength(); i++) { Node node = childNodes.item(i); - if (node instanceof Element) { - return (Element) node; + if (node instanceof Element element1) { + return element1; } } return null; diff --git a/odata_renderer/src/test/java/com/sdl/odata/renderer/atom/writer/AtomWriterTest.java b/odata_renderer/src/test/java/com/sdl/odata/renderer/atom/writer/AtomWriterTest.java index 1ae57aa8..43fb615a 100644 --- a/odata_renderer/src/test/java/com/sdl/odata/renderer/atom/writer/AtomWriterTest.java +++ b/odata_renderer/src/test/java/com/sdl/odata/renderer/atom/writer/AtomWriterTest.java @@ -217,8 +217,8 @@ private void checkWrittenXmlStream(Object data, Map<String, Object> meta, String new ODataV4AtomNSConfigurationProvider(), isWriteOperation, false); writer.startDocument(); - if (data instanceof List) { - writer.writeFeed((List<?>) data, contextURL, meta); + if (data instanceof List<?> list) { + writer.writeFeed(list, contextURL, meta); } else { writer.writeEntry(data, contextURL); } diff --git a/odata_renderer/src/test/java/com/sdl/odata/renderer/json/writer/JsonWriterTest.java b/odata_renderer/src/test/java/com/sdl/odata/renderer/json/writer/JsonWriterTest.java index abfd829c..5ba4fb92 100644 --- a/odata_renderer/src/test/java/com/sdl/odata/renderer/json/writer/JsonWriterTest.java +++ b/odata_renderer/src/test/java/com/sdl/odata/renderer/json/writer/JsonWriterTest.java @@ -185,8 +185,8 @@ private void checkWrittenJsonStream(Object data, Map<String, Object> meta, Strin JsonWriter writer = new JsonWriter(odataUri, entityDataModel); String jsonStream; - if (data instanceof List) { - jsonStream = writer.writeFeed((List<?>) data, contextURL, meta); + if (data instanceof List<?> list) { + jsonStream = writer.writeFeed(list, contextURL, meta); } else { jsonStream = writer.writeEntry(data, contextURL); } diff --git a/odata_service/pom.xml b/odata_service/pom.xml index d931018d..effa3d3b 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -54,6 +54,7 @@ <dependency> <groupId>jakarta.annotation</groupId> <artifactId>jakarta.annotation-api</artifactId> + <scope>provided</scope> </dependency> <dependency> <groupId>org.apache.pekko</groupId> diff --git a/odata_war/src/main/webapp/WEB-INF/web.xml b/odata_war/src/main/webapp/WEB-INF/web.xml index 455d60a3..962f37a3 100644 --- a/odata_war/src/main/webapp/WEB-INF/web.xml +++ b/odata_war/src/main/webapp/WEB-INF/web.xml @@ -16,10 +16,10 @@ --> <web-app metadata-complete="false" - xmlns="http://java.sun.com/xml/ns/javaee" + xmlns="https://jakarta.ee/xml/ns/jakartaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" - version="3.0"> + xsi:schemaLocation="https://jakarta.ee/xml/ns/jakartaee https://jakarta.ee/xml/ns/jakartaee/web-app_6_0.xsd" + version="6.0"> <display-name>OData v4 WAR module</display-name> diff --git a/pom.xml b/pom.xml index f0c9aca0..58942b45 100644 --- a/pom.xml +++ b/pom.xml @@ -45,7 +45,6 @@ <module>odata_controller</module> <module>odata_webservice</module> <module>odata_war</module> - <module>odata_client_tracing</module> </modules> <organization> @@ -89,28 +88,26 @@ <java.version>21</java.version> <!-- Third party dependency versions, sorted alphabetically --> - <brave.version>4.13.6</brave.version> <guava.version>33.2.0-jre</guava.version> - <httpcomponents.version>4.5.14</httpcomponents.version> + <httpclient5.version>5.5.1</httpclient5.version> <jackson.version>2.17.3</jackson.version> - <jacoco.version>0.8.12</jacoco.version> + <jacoco.version>0.8.14</jacoco.version> <jakarta-annotation-api.version>3.0.0</jakarta-annotation-api.version> <jakarta.servlet-api.version>6.1.0</jakarta.servlet-api.version> <junit-jupiter.version>5.9.2</junit-jupiter.version> <logback.version>1.5.17</logback.version> - <mockito-junit5.version>4.5.1</mockito-junit5.version> + <mockito-junit5.version>5.20.0</mockito-junit5.version> <pekko.version>1.0.3</pekko.version> <scala-genjavadoc-plugin.version>0.19</scala-genjavadoc-plugin.version> <scala-parser-combinators.version>2.1.1</scala-parser-combinators.version> <scala.version>2.12.19</scala.version> <scalatest.version>3.1.4</scalatest.version> <slf4j.version>2.0.13</slf4j.version> - <spring-boot.version>3.3.9</spring-boot.version> - <spring.version>6.1.18</spring.version> + <spring-boot.version>3.5.7</spring-boot.version> + <spring.version>6.2.12</spring.version> <tomcat.version>10.1.39</tomcat.version> <typesafe-config.version>1.4.3</typesafe-config.version> <xerces.version>2.12.2</xerces.version> - <zipkin-sender.version>1.1.2</zipkin-sender.version> </properties> <!-- Dependency management --> @@ -167,9 +164,9 @@ <version>${xerces.version}</version> </dependency> <dependency> - <groupId>org.apache.httpcomponents</groupId> - <artifactId>httpclient</artifactId> - <version>${httpcomponents.version}</version> + <groupId>org.apache.httpcomponents.client5</groupId> + <artifactId>httpclient5</artifactId> + <version>${httpclient5.version}</version> </dependency> <dependency> <groupId>jakarta.annotation</groupId> @@ -336,23 +333,6 @@ <version>${tomcat.version}</version> </dependency> - <!-- Tracing libraries for sending spans to zipkin --> - <dependency> - <groupId>io.zipkin.brave</groupId> - <artifactId>brave-apache-http-interceptors</artifactId> - <version>${brave.version}</version> - </dependency> - <dependency> - <groupId>io.zipkin.brave</groupId> - <artifactId>brave-spancollector-http</artifactId> - <version>${brave.version}</version> - </dependency> - <dependency> - <groupId>io.zipkin.reporter</groupId> - <artifactId>zipkin-sender-urlconnection</artifactId> - <version>${zipkin-sender.version}</version> - </dependency> - <!-- OData dependencies --> <dependency> <groupId>com.sdl</groupId> @@ -494,7 +474,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.0</version> + <version>3.14.1</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -580,7 +560,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-war-plugin</artifactId> - <version>3.4.0</version> + <version>3.5.1</version> </plugin> <plugin> @@ -697,8 +677,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <configuration> - <source>${java.version}</source> - <target>${java.version}</target> + <release>${java.version}</release> </configuration> <executions> <execution> From 1c18c1173b2875cee5cc6ae93a66ee2ccc6d6d9c Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers <artifact.publishers@sdl.com> Date: Tue, 2 Dec 2025 09:08:01 +0000 Subject: [PATCH 09/21] [maven-release-plugin] prepare release release/2.12/2.12.8 --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index 2bc8b610..09005f63 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_api</artifactId> diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index 08036a7d..bf451d00 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index 359282cf..4ad6908f 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ <parent> <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_checkstyle</artifactId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> <packaging>jar</packaging> <name>OData Checkstyle</name> diff --git a/odata_client/pom.xml b/odata_client/pom.xml index 3d0c60f6..0f51db0c 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_client</artifactId> diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index d9091859..4a7ca64e 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_client_api</artifactId> diff --git a/odata_common/pom.xml b/odata_common/pom.xml index f24c0ffd..de6c81aa 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_common</artifactId> diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index 6479c1da..3ebeab1a 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_controller</artifactId> diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index b0fa1625..9f213c1a 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_edm</artifactId> diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index e4837c2d..1ee89682 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_parser</artifactId> diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index df08deef..5540c12c 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_processor</artifactId> diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index 1d5e51c3..460e31dc 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_renderer</artifactId> diff --git a/odata_service/pom.xml b/odata_service/pom.xml index effa3d3b..a4fb9942 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_service</artifactId> diff --git a/odata_test/pom.xml b/odata_test/pom.xml index 6d014563..61105fb9 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_test</artifactId> diff --git a/odata_war/pom.xml b/odata_war/pom.xml index f98d52c7..5a57dd59 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_war</artifactId> diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index 6490350a..e2727fa6 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> </parent> <artifactId>odata_webservice</artifactId> diff --git a/pom.xml b/pom.xml index 58942b45..b0b2d765 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12-SNAPSHOT</version> + <version>2.12.8</version> <packaging>pom</packaging> <name>Tridion OData v4 Framework</name> @@ -72,7 +72,7 @@ <connection>scm:git:git@github.com:sdl/odata.git</connection> <developerConnection>scm:git:git@github.com:sdl/odata.git</developerConnection> <url>git@github.com:sdl/odata.git</url> - <tag>HEAD</tag> + <tag>release/2.12/2.12.8</tag> </scm> <properties> From 4c3bae30c913df737953f077b2f9164dc7cc1248 Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers <artifact.publishers@sdl.com> Date: Tue, 2 Dec 2025 09:08:03 +0000 Subject: [PATCH 10/21] [maven-release-plugin] prepare for next development iteration --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index 09005f63..2bc8b610 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_api</artifactId> diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index bf451d00..08036a7d 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index 4ad6908f..359282cf 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ <parent> <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_checkstyle</artifactId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> <packaging>jar</packaging> <name>OData Checkstyle</name> diff --git a/odata_client/pom.xml b/odata_client/pom.xml index 0f51db0c..3d0c60f6 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_client</artifactId> diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index 4a7ca64e..d9091859 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_client_api</artifactId> diff --git a/odata_common/pom.xml b/odata_common/pom.xml index de6c81aa..f24c0ffd 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_common</artifactId> diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index 3ebeab1a..6479c1da 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_controller</artifactId> diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index 9f213c1a..b0fa1625 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_edm</artifactId> diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index 1ee89682..e4837c2d 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_parser</artifactId> diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index 5540c12c..df08deef 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_processor</artifactId> diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index 460e31dc..1d5e51c3 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_renderer</artifactId> diff --git a/odata_service/pom.xml b/odata_service/pom.xml index a4fb9942..effa3d3b 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_service</artifactId> diff --git a/odata_test/pom.xml b/odata_test/pom.xml index 61105fb9..6d014563 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_test</artifactId> diff --git a/odata_war/pom.xml b/odata_war/pom.xml index 5a57dd59..f98d52c7 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_war</artifactId> diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index e2727fa6..6490350a 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_webservice</artifactId> diff --git a/pom.xml b/pom.xml index b0b2d765..58942b45 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12.8</version> + <version>2.12-SNAPSHOT</version> <packaging>pom</packaging> <name>Tridion OData v4 Framework</name> @@ -72,7 +72,7 @@ <connection>scm:git:git@github.com:sdl/odata.git</connection> <developerConnection>scm:git:git@github.com:sdl/odata.git</developerConnection> <url>git@github.com:sdl/odata.git</url> - <tag>release/2.12/2.12.8</tag> + <tag>HEAD</tag> </scm> <properties> From 1451455a25cf6f34d0b72a6ed40af9c554b48cf8 Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Tue, 2 Dec 2025 10:31:30 +0000 Subject: [PATCH 11/21] UDP-11451 : Updated plugins --- pom.xml | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/pom.xml b/pom.xml index 58942b45..7d076814 100644 --- a/pom.xml +++ b/pom.xml @@ -433,19 +433,19 @@ <plugin> <groupId>com.mycila</groupId> <artifactId>license-maven-plugin</artifactId> - <version>4.6</version> + <version>5.0.0</version> </plugin> <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> - <version>4.5.6</version> + <version>4.9.7</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-antrun-plugin</artifactId> - <version>3.1.0</version> + <version>3.2.0</version> <dependencies> <dependency> <groupId>org.apache.ant</groupId> @@ -469,7 +469,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-clean-plugin</artifactId> - <version>3.4.1</version> + <version>3.5.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -479,7 +479,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> - <version>3.8.1</version> + <version>3.9.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -489,12 +489,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-enforcer-plugin</artifactId> - <version>3.5.0</version> + <version>3.6.2</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-gpg-plugin</artifactId> - <version>3.2.7</version> + <version>3.2.8</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -504,7 +504,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> - <version>3.4.2</version> + <version>3.5.0</version> <configuration> <archive> <addMavenDescriptor>false</addMavenDescriptor> @@ -526,12 +526,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-javadoc-plugin</artifactId> - <version>3.11.2</version> + <version>3.12.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <version>3.1.1</version> + <version>3.2.0</version> <configuration> <autoVersionSubmodules>true</autoVersionSubmodules> <releaseProfiles>release</releaseProfiles> @@ -540,12 +540,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> - <version>3.3.1</version> + <version>3.4.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-source-plugin</artifactId> - <version>3.3.1</version> + <version>3.4.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -555,7 +555,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>3.5.2</version> + <version>3.5.4</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -566,17 +566,17 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> - <version>3.6.0</version> + <version>3.6.1</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>flatten-maven-plugin</artifactId> - <version>1.7.0</version> + <version>1.7.3</version> </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> - <version>2.18.0</version> + <version>2.20.1</version> <configuration> <includes> <include>com.sdl:*</include> From f6680dbad0a75d8562e30bac3d2eff809c724a2d Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Tue, 2 Dec 2025 12:17:29 +0000 Subject: [PATCH 12/21] UDP-11451 : Switched to central publishing --- .github/workflows/release.yml | 14 ++++++-------- pom.xml | 16 ++++++++-------- 2 files changed, 14 insertions(+), 16 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 427a64f3..2f4047b3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,9 +6,9 @@ on: releaseVersion: description: 'Release version' required: true - default: '2.9' + default: '2.12' releaseBuild: - description: 'Release build' + description: 'Release build (e.g. 8)' required: true default: '' @@ -25,8 +25,8 @@ jobs: with: distribution: 'temurin' java-version: '21' - server-id: ossrh - server-username: MAVEN_USERNAME + server-id: central + server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_TOKEN gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE @@ -49,11 +49,9 @@ jobs: TAG: release/${{ github.event.inputs.releaseVersion }}/${{ github.event.inputs.releaseVersion }}.${{ github.event.inputs.releaseBuild }} # Suppress logging during release prep/perform LOGGING: org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} - # This is to work around https://issues.sonatype.org/browse/NEXUS-27902 on JDK17 - JDK_JAVA_OPTIONS: "--add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED" run: | echo "::group::Prepare" mvn --batch-mode --no-transfer-progress release:prepare -DreleaseVersion=${{ env.RELEASE }} \ diff --git a/pom.xml b/pom.xml index 7d076814..cf98cd5e 100644 --- a/pom.xml +++ b/pom.xml @@ -609,9 +609,9 @@ </plugin> <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> - <version>1.7.0</version> + <groupId>org.sonatype.central</groupId> + <artifactId>central-publishing-maven-plugin</artifactId> + <version>0.9.0</version> </plugin> </plugins> @@ -880,13 +880,13 @@ </executions> </plugin> <plugin> - <groupId>org.sonatype.plugins</groupId> - <artifactId>nexus-staging-maven-plugin</artifactId> + <groupId>org.sonatype.central</groupId> + <artifactId>central-publishing-maven-plugin</artifactId> <extensions>true</extensions> <configuration> - <serverId>ossrh</serverId> - <nexusUrl>https://s01.oss.sonatype.org/</nexusUrl> - <autoReleaseAfterClose>true</autoReleaseAfterClose> + <publishingServerId>central</publishingServerId> + <autoPublish>true</autoPublish> + <waitUntil>published</waitUntil> </configuration> </plugin> </plugins> From e5a960e7c37ede7371f39337e01641dbf822edbf Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers <artifact.publishers@sdl.com> Date: Tue, 2 Dec 2025 12:23:21 +0000 Subject: [PATCH 13/21] [maven-release-plugin] prepare release release/2.12/2.12.9 --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index 2bc8b610..3b8576c8 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_api</artifactId> diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index 08036a7d..221c012d 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index 359282cf..3eedd2cc 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ <parent> <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_checkstyle</artifactId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> <packaging>jar</packaging> <name>OData Checkstyle</name> diff --git a/odata_client/pom.xml b/odata_client/pom.xml index 3d0c60f6..415d6aa0 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_client</artifactId> diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index d9091859..c3324daa 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_client_api</artifactId> diff --git a/odata_common/pom.xml b/odata_common/pom.xml index f24c0ffd..242a4975 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_common</artifactId> diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index 6479c1da..9595cc36 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_controller</artifactId> diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index b0fa1625..c330db56 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_edm</artifactId> diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index e4837c2d..50ebabf7 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_parser</artifactId> diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index df08deef..442d3b8d 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_processor</artifactId> diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index 1d5e51c3..1c65dd05 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_renderer</artifactId> diff --git a/odata_service/pom.xml b/odata_service/pom.xml index effa3d3b..dd525c03 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_service</artifactId> diff --git a/odata_test/pom.xml b/odata_test/pom.xml index 6d014563..ce1d15ff 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_test</artifactId> diff --git a/odata_war/pom.xml b/odata_war/pom.xml index f98d52c7..6c98c6e1 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_war</artifactId> diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index 6490350a..63ac77e6 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> </parent> <artifactId>odata_webservice</artifactId> diff --git a/pom.xml b/pom.xml index cf98cd5e..a0811c94 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12-SNAPSHOT</version> + <version>2.12.9</version> <packaging>pom</packaging> <name>Tridion OData v4 Framework</name> @@ -72,7 +72,7 @@ <connection>scm:git:git@github.com:sdl/odata.git</connection> <developerConnection>scm:git:git@github.com:sdl/odata.git</developerConnection> <url>git@github.com:sdl/odata.git</url> - <tag>HEAD</tag> + <tag>release/2.12/2.12.9</tag> </scm> <properties> From 6242aa413b6f63e569ce06a7f2581b9b8a8723ae Mon Sep 17 00:00:00 2001 From: RWS Artifact Publishers <artifact.publishers@sdl.com> Date: Tue, 2 Dec 2025 12:23:24 +0000 Subject: [PATCH 14/21] [maven-release-plugin] prepare for next development iteration --- odata_api/pom.xml | 2 +- odata_assembly/pom.xml | 2 +- odata_checkstyle/pom.xml | 4 ++-- odata_client/pom.xml | 2 +- odata_client_api/pom.xml | 2 +- odata_common/pom.xml | 2 +- odata_controller/pom.xml | 2 +- odata_edm/pom.xml | 2 +- odata_parser/pom.xml | 2 +- odata_processor/pom.xml | 2 +- odata_renderer/pom.xml | 2 +- odata_service/pom.xml | 2 +- odata_test/pom.xml | 2 +- odata_war/pom.xml | 2 +- odata_webservice/pom.xml | 2 +- pom.xml | 4 ++-- 16 files changed, 18 insertions(+), 18 deletions(-) diff --git a/odata_api/pom.xml b/odata_api/pom.xml index 3b8576c8..2bc8b610 100644 --- a/odata_api/pom.xml +++ b/odata_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_api</artifactId> diff --git a/odata_assembly/pom.xml b/odata_assembly/pom.xml index 221c012d..08036a7d 100644 --- a/odata_assembly/pom.xml +++ b/odata_assembly/pom.xml @@ -20,7 +20,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/odata_checkstyle/pom.xml b/odata_checkstyle/pom.xml index 3eedd2cc..359282cf 100644 --- a/odata_checkstyle/pom.xml +++ b/odata_checkstyle/pom.xml @@ -22,11 +22,11 @@ <parent> <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_checkstyle</artifactId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> <packaging>jar</packaging> <name>OData Checkstyle</name> diff --git a/odata_client/pom.xml b/odata_client/pom.xml index 415d6aa0..3d0c60f6 100644 --- a/odata_client/pom.xml +++ b/odata_client/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_client</artifactId> diff --git a/odata_client_api/pom.xml b/odata_client_api/pom.xml index c3324daa..d9091859 100644 --- a/odata_client_api/pom.xml +++ b/odata_client_api/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_client_api</artifactId> diff --git a/odata_common/pom.xml b/odata_common/pom.xml index 242a4975..f24c0ffd 100644 --- a/odata_common/pom.xml +++ b/odata_common/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_common</artifactId> diff --git a/odata_controller/pom.xml b/odata_controller/pom.xml index 9595cc36..6479c1da 100644 --- a/odata_controller/pom.xml +++ b/odata_controller/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_controller</artifactId> diff --git a/odata_edm/pom.xml b/odata_edm/pom.xml index c330db56..b0fa1625 100644 --- a/odata_edm/pom.xml +++ b/odata_edm/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_edm</artifactId> diff --git a/odata_parser/pom.xml b/odata_parser/pom.xml index 50ebabf7..e4837c2d 100644 --- a/odata_parser/pom.xml +++ b/odata_parser/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_parser</artifactId> diff --git a/odata_processor/pom.xml b/odata_processor/pom.xml index 442d3b8d..df08deef 100644 --- a/odata_processor/pom.xml +++ b/odata_processor/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_processor</artifactId> diff --git a/odata_renderer/pom.xml b/odata_renderer/pom.xml index 1c65dd05..1d5e51c3 100644 --- a/odata_renderer/pom.xml +++ b/odata_renderer/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_renderer</artifactId> diff --git a/odata_service/pom.xml b/odata_service/pom.xml index dd525c03..effa3d3b 100644 --- a/odata_service/pom.xml +++ b/odata_service/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_service</artifactId> diff --git a/odata_test/pom.xml b/odata_test/pom.xml index ce1d15ff..6d014563 100644 --- a/odata_test/pom.xml +++ b/odata_test/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_test</artifactId> diff --git a/odata_war/pom.xml b/odata_war/pom.xml index 6c98c6e1..f98d52c7 100644 --- a/odata_war/pom.xml +++ b/odata_war/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_war</artifactId> diff --git a/odata_webservice/pom.xml b/odata_webservice/pom.xml index 63ac77e6..6490350a 100644 --- a/odata_webservice/pom.xml +++ b/odata_webservice/pom.xml @@ -22,7 +22,7 @@ <parent> <artifactId>odata</artifactId> <groupId>com.sdl</groupId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> </parent> <artifactId>odata_webservice</artifactId> diff --git a/pom.xml b/pom.xml index a0811c94..cf98cd5e 100644 --- a/pom.xml +++ b/pom.xml @@ -21,7 +21,7 @@ <groupId>com.sdl</groupId> <artifactId>odata</artifactId> - <version>2.12.9</version> + <version>2.12-SNAPSHOT</version> <packaging>pom</packaging> <name>Tridion OData v4 Framework</name> @@ -72,7 +72,7 @@ <connection>scm:git:git@github.com:sdl/odata.git</connection> <developerConnection>scm:git:git@github.com:sdl/odata.git</developerConnection> <url>git@github.com:sdl/odata.git</url> - <tag>release/2.12/2.12.9</tag> + <tag>HEAD</tag> </scm> <properties> From 690b80824e636d6a76ed391a35faed9dbd0e8737 Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Tue, 2 Dec 2025 12:35:31 +0000 Subject: [PATCH 15/21] UDP-11451 : Added run-name --- .github/workflows/release.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2f4047b3..090dde99 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,5 +1,7 @@ name: Release +run-name: Release ${{ inputs.releaseVersion }}.${{ inputs.releaseBuild }} by @${{ github.actor }} + on: workflow_dispatch: inputs: From 281ca2726a63f1781b5b6862d5d722a1c996137f Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Thu, 5 Feb 2026 10:09:25 +0000 Subject: [PATCH 16/21] UDP-11494 : Added automerge --- .github/workflows/auto-merge.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/auto-merge.yml diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml new file mode 100644 index 00000000..b9e30f7b --- /dev/null +++ b/.github/workflows/auto-merge.yml @@ -0,0 +1,28 @@ +name: Automatic Branch Merging + +on: + pull_request: + types: + - closed + +permissions: + contents: write + pull-requests: write + issues: write + +jobs: + merge: + name: Cascading Auto Merge + runs-on: ubuntu-latest + + if: | + github.event.pull_request.merged == true && + startsWith(github.base_ref, 'release/') + + steps: + - name: Automatic Merge + uses: ActionsDesk/cascading-downstream-merge@v3.1.0 + with: + github_token: \${{ secrets.GITHUB_TOKEN }} + prefixes: release/ + ref_branch: develop \ No newline at end of file From be0360a8ff432d513da6af39adfac68dadfa84e2 Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Fri, 20 Mar 2026 20:24:35 +0000 Subject: [PATCH 17/21] UDP-11513 : Aligned libraries --- pom.xml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pom.xml b/pom.xml index 76186c7f..9cbdb2ea 100644 --- a/pom.xml +++ b/pom.xml @@ -88,24 +88,24 @@ <java.version>25</java.version> <!-- Third party dependency versions, sorted alphabetically --> - <guava.version>33.2.0-jre</guava.version> - <httpclient5.version>5.5.1</httpclient5.version> + <guava.version>33.5.0-jre</guava.version> + <httpclient5.version>5.6</httpclient5.version> <jackson.version>2.17.3</jackson.version> <jacoco.version>0.8.14</jacoco.version> <jakarta-annotation-api.version>3.0.0</jakarta-annotation-api.version> <jakarta.servlet-api.version>6.1.0</jakarta.servlet-api.version> <junit-jupiter.version>5.9.2</junit-jupiter.version> - <logback.version>1.5.17</logback.version> - <mockito-junit5.version>5.20.0</mockito-junit5.version> - <pekko.version>1.0.3</pekko.version> + <logback.version>1.5.32</logback.version> + <mockito-junit5.version>5.23.0</mockito-junit5.version> + <pekko.version>1.4.0</pekko.version> <scala-genjavadoc-plugin.version>0.19</scala-genjavadoc-plugin.version> <scala-parser-combinators.version>2.1.1</scala-parser-combinators.version> <scala.version>2.12.19</scala.version> <scalatest.version>3.1.4</scalatest.version> - <slf4j.version>2.0.13</slf4j.version> - <spring-boot.version>3.5.7</spring-boot.version> - <spring.version>6.2.12</spring.version> - <tomcat.version>10.1.39</tomcat.version> + <slf4j.version>2.0.17</slf4j.version> + <spring-boot.version>3.5.11</spring-boot.version> + <spring.version>6.2.17</spring.version> + <tomcat.version>10.1.52</tomcat.version> <typesafe-config.version>1.4.3</typesafe-config.version> <xerces.version>2.12.2</xerces.version> </properties> @@ -439,7 +439,7 @@ <plugin> <groupId>net.alchim31.maven</groupId> <artifactId>scala-maven-plugin</artifactId> - <version>4.9.7</version> + <version>4.9.10</version> </plugin> <plugin> @@ -450,7 +450,7 @@ <dependency> <groupId>org.apache.ant</groupId> <artifactId>ant</artifactId> - <version>1.10.11</version> + <version>1.10.15</version> </dependency> </dependencies> </plugin> @@ -474,12 +474,12 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> - <version>3.14.1</version> + <version>3.15.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-dependency-plugin</artifactId> - <version>3.9.0</version> + <version>3.10.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -531,7 +531,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> - <version>3.2.0</version> + <version>3.3.1</version> <configuration> <autoVersionSubmodules>true</autoVersionSubmodules> <releaseProfiles>release</releaseProfiles> @@ -540,7 +540,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-resources-plugin</artifactId> - <version>3.4.0</version> + <version>3.5.0</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -555,7 +555,7 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> - <version>3.5.4</version> + <version>3.5.5</version> </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> @@ -576,7 +576,7 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>versions-maven-plugin</artifactId> - <version>2.20.1</version> + <version>2.21.0</version> <configuration> <includes> <include>com.sdl:*</include> @@ -611,7 +611,7 @@ <plugin> <groupId>org.sonatype.central</groupId> <artifactId>central-publishing-maven-plugin</artifactId> - <version>0.9.0</version> + <version>0.10.0</version> </plugin> </plugins> From 634d9700c7cbb2f1039a7c03ccaa4b4dac8e66cb Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Fri, 20 Mar 2026 20:58:31 +0000 Subject: [PATCH 18/21] UDP-11513 : Added automerge --- .github/workflows/auto-merge.yml | 4 ++-- .github/workflows/maven.yml | 4 ++-- .github/workflows/release.yml | 16 ++++++++-------- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/auto-merge.yml b/.github/workflows/auto-merge.yml index b9e30f7b..739a9fbc 100644 --- a/.github/workflows/auto-merge.yml +++ b/.github/workflows/auto-merge.yml @@ -21,8 +21,8 @@ jobs: steps: - name: Automatic Merge - uses: ActionsDesk/cascading-downstream-merge@v3.1.0 + uses: ActionsDesk/cascading-downstream-merge@v3 with: - github_token: \${{ secrets.GITHUB_TOKEN }} + github_token: ${{ secrets.GITHUB_TOKEN }} prefixes: release/ ref_branch: develop \ No newline at end of file diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b505fb18..0929ae4f 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -15,9 +15,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '8' diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 446b157b..a6a2af65 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,23 +10,23 @@ on: releaseBuild: description: 'Release build' required: true - default: '' + default: '0' jobs: release: - name: Release on Sonatype OSS + name: Release on Sonatype OSS ${{ github.event.inputs.releaseVersion }}.${{ github.event.inputs.releaseBuild }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v6 - name: Set up JDK 8 - uses: actions/setup-java@v3 + uses: actions/setup-java@v5 with: distribution: 'temurin' java-version: '8' - server-id: ossrh - server-username: MAVEN_USERNAME + server-id: central + server-username: MAVEN_CENTRAL_USERNAME server-password: MAVEN_CENTRAL_TOKEN gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }} gpg-passphrase: MAVEN_GPG_PASSPHRASE @@ -49,8 +49,8 @@ jobs: TAG: release/${{ github.event.inputs.releaseVersion }}/${{ github.event.inputs.releaseVersion }}.${{ github.event.inputs.releaseBuild }} # Suppress logging during release prep/perform LOGGING: org.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn - MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }} - MAVEN_CENTRAL_TOKEN: ${{ secrets.OSSRH_TOKEN }} + MAVEN_CENTRAL_USERNAME: ${{ secrets.MAVEN_CENTRAL_USERNAME }} + MAVEN_CENTRAL_TOKEN: ${{ secrets.MAVEN_CENTRAL_TOKEN }} MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }} run: | echo "::group::Prepare" From 7cf6e631d496d2e90aad2bd14bcf64ccea18becb Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Fri, 20 Mar 2026 21:04:37 +0000 Subject: [PATCH 19/21] UDP-11513 : Added automerge --- .github/workflows/maven.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 0929ae4f..5377c164 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,9 +5,9 @@ name: Build on: push: - branches: [ develop ] + branches: [ release/2.9 ] pull_request: - branches: [ develop ] + branches: [ release/2.9 ] jobs: build: From e71bf38c35b10cf083a0f4dbceb66e8897b461fd Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Fri, 20 Mar 2026 22:07:46 +0000 Subject: [PATCH 20/21] UDP-11513 : Fixed actions --- .github/workflows/maven.yml | 4 ++-- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 2c0449f4..b2b88583 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,9 +5,9 @@ name: Build on: push: - branches: [ release/2.10 ] + branches: [ release/2.11 ] pull_request: - branches: [ release/2.10 ] + branches: [ release/2.11 ] jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebbd8c42..1ce1b388 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,7 +6,7 @@ on: releaseVersion: description: 'Release version' required: true - default: '2.10' + default: '2.11' releaseBuild: description: 'Release build' required: true From 0ba442375cd7ef8b2db6000feb78860273256a2d Mon Sep 17 00:00:00 2001 From: Ben Middleton <bmiddleton@sdl.com> Date: Fri, 20 Mar 2026 22:24:13 +0000 Subject: [PATCH 21/21] UDP-11513 : Fixed actions --- .github/workflows/maven.yml | 4 ++-- .github/workflows/release.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index fe3df517..b0c58390 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -5,9 +5,9 @@ name: Build on: push: - branches: [ release/2.12 ] + branches: [ release/2.13 ] pull_request: - branches: [ release/2.12 ] + branches: [ release/2.13 ] jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ac7a9a6e..3053ab28 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -8,7 +8,7 @@ on: releaseVersion: description: 'Release version' required: true - default: '2.12' + default: '2.13' releaseBuild: description: 'Release build (e.g. 8)' required: true