From 47211588f99f25ece9099c9cf20155a9c9aa22eb Mon Sep 17 00:00:00 2001 From: Devdutt Sharma Date: Sat, 7 Mar 2026 17:43:40 -0500 Subject: [PATCH 01/11] Add since and forRemoval to @Deprecated annotation (#1) --- .../src/main/java/org/xwiki/bridge/DocumentAccessBridge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwiki-platform-core/xwiki-platform-bridge/src/main/java/org/xwiki/bridge/DocumentAccessBridge.java b/xwiki-platform-core/xwiki-platform-bridge/src/main/java/org/xwiki/bridge/DocumentAccessBridge.java index bd44f0cbbed..d280364f273 100644 --- a/xwiki-platform-core/xwiki-platform-bridge/src/main/java/org/xwiki/bridge/DocumentAccessBridge.java +++ b/xwiki-platform-core/xwiki-platform-bridge/src/main/java/org/xwiki/bridge/DocumentAccessBridge.java @@ -190,7 +190,7 @@ default DocumentModelBridge getTranslatedDocumentInstance(EntityReference entity * @deprecated replaced by {@link #exists(DocumentReference)} since 2.2.1 * @throws Exception when failing to check document existence */ - @Deprecated + @Deprecated(since = "2.2.1", forRemoval = false) boolean exists(String documentReference) throws Exception; /** From d7957dfad6e01837d796049a5c29bc7d3eb0f84c Mon Sep 17 00:00:00 2001 From: RollingJungle <43827155+RollingJungle@users.noreply.github.com> Date: Sun, 8 Mar 2026 15:46:46 -0400 Subject: [PATCH 02/11] Create sonarcloud.yml Adding this to be able to scan the project in SonarCloud --- .github/workflows/sonarcloud.yml | 55 ++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml new file mode 100644 index 00000000000..57f2cd35a0a --- /dev/null +++ b/.github/workflows/sonarcloud.yml @@ -0,0 +1,55 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +# This workflow helps you trigger a SonarCloud analysis of your code and populates +# GitHub Code Scanning alerts with the vulnerabilities found. +# Free for open source project. + +# 1. Login to SonarCloud.io using your GitHub account + +# 2. Import your project on SonarCloud +# * Add your GitHub organization first, then add your repository as a new project. +# * Please note that many languages are eligible for automatic analysis, +# which means that the analysis will start automatically without the need to set up GitHub Actions. +# * This behavior can be changed in Administration > Analysis Method. +# +# 3. Follow the SonarCloud in-product tutorial +# * a. Copy/paste the Project Key and the Organization Key into the args parameter below +# (You'll find this information in SonarCloud. Click on "Information" at the bottom left) +# +# * b. Generate a new token and add it to your Github repository's secrets using the name SONAR_TOKEN +# (On SonarCloud, click on your avatar on top-right > My account > Security +# or go directly to https://sonarcloud.io/account/security/) + +# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/) +# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/help/sc/9) + +name: SonarCloud analysis + +on: + push: + branches: [ "david-develop-branch" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + +permissions: + pull-requests: read # allows SonarCloud to decorate PRs with analysis results + +jobs: + Analysis: + runs-on: ubuntu-latest + + steps: + - name: Analyze with SonarCloud + uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + args: > + -Dsonar.projectKey=rollingjungle_david-sonar-xwiki + -Dsonar.organization=rollingjungle + -Dsonar.sources=. + projectBaseDir: . From d8a8b2bc21c4aa786abde5367e1dd41c89780520 Mon Sep 17 00:00:00 2001 From: RollingJungle <43827155+RollingJungle@users.noreply.github.com> Date: Sun, 8 Mar 2026 16:22:19 -0400 Subject: [PATCH 03/11] Update sonarcloud.yml to include scanning xwiki-platform-crypto --- .github/workflows/sonarcloud.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 57f2cd35a0a..8a24f0a0cd8 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -47,9 +47,11 @@ jobs: uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: + with: args: > -Dsonar.projectKey=rollingjungle_david-sonar-xwiki -Dsonar.organization=rollingjungle - -Dsonar.sources=. + -Dsonar.sources=xwiki-platform-core/xwiki-platform-crypto + -Dsonar.java.binaries=**/target/classes + -Dsonar.projectBaseDir=. projectBaseDir: . From 84f3badd7d57e71ea5db36f05b1ac6ea9dd5b8a8 Mon Sep 17 00:00:00 2001 From: RollingJungle <43827155+RollingJungle@users.noreply.github.com> Date: Sun, 8 Mar 2026 16:34:27 -0400 Subject: [PATCH 04/11] Fix YML issue --- .github/workflows/sonarcloud.yml | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 8a24f0a0cd8..d2faac9f07d 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -43,15 +43,14 @@ jobs: runs-on: ubuntu-latest steps: - - name: Analyze with SonarCloud - uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.projectKey=rollingjungle_david-sonar-xwiki - -Dsonar.organization=rollingjungle - -Dsonar.sources=xwiki-platform-core/xwiki-platform-crypto - -Dsonar.java.binaries=**/target/classes - -Dsonar.projectBaseDir=. - projectBaseDir: . + - name: Analyze with SonarCloud + uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + args: > + -Dsonar.projectKey=rollingjungle_david-sonar-xwiki + -Dsonar.organization=rollingjungle + -Dsonar.sources=xwiki-platform-core/xwiki-platform-crypto + -Dsonar.java.binaries=**/target/classes + projectBaseDir: . From c0a6294cef05a08df8bbd20020596756f82a0d6c Mon Sep 17 00:00:00 2001 From: RollingJungle <43827155+RollingJungle@users.noreply.github.com> Date: Sun, 8 Mar 2026 16:40:00 -0400 Subject: [PATCH 05/11] Update sonarcloud.yml Fixing formatting --- .github/workflows/sonarcloud.yml | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index d2faac9f07d..44de7351f4b 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -43,14 +43,18 @@ jobs: runs-on: ubuntu-latest steps: - - name: Analyze with SonarCloud - uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.projectKey=rollingjungle_david-sonar-xwiki - -Dsonar.organization=rollingjungle - -Dsonar.sources=xwiki-platform-core/xwiki-platform-crypto - -Dsonar.java.binaries=**/target/classes - projectBaseDir: . + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Analyze with SonarCloud + uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 + env: + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + args: > + -Dsonar.projectKey=rollingjungle_david-sonar-xwiki + -Dsonar.organization=rollingjungle + -Dsonar.sources=xwiki-platform-core/xwiki-platform-crypto + -Dsonar.java.binaries=**/target/classes From 45234c37d031271fb8601c9c33017bb7e85a7c6c Mon Sep 17 00:00:00 2001 From: RollingJungle <43827155+RollingJungle@users.noreply.github.com> Date: Sun, 8 Mar 2026 16:47:03 -0400 Subject: [PATCH 06/11] Update sonarcloud.yml --- .github/workflows/sonarcloud.yml | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml index 44de7351f4b..473b8de82aa 100644 --- a/.github/workflows/sonarcloud.yml +++ b/.github/workflows/sonarcloud.yml @@ -41,20 +41,25 @@ permissions: jobs: Analysis: runs-on: ubuntu-latest - steps: - name: Checkout code uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Analyze with SonarCloud - uses: SonarSource/sonarcloud-github-action@4006f663ecaf1f8093e8e4abb9227f6041f52216 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + cache: 'maven' + + - name: Build Crypto Module and Scan env: SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.projectKey=rollingjungle_david-sonar-xwiki - -Dsonar.organization=rollingjungle - -Dsonar.sources=xwiki-platform-core/xwiki-platform-crypto - -Dsonar.java.binaries=**/target/classes + run: | + mvn -pl xwiki-platform-core/xwiki-platform-crypto install -DskipTests + mvn -pl xwiki-platform-core/xwiki-platform-crypto sonar:sonar \ + -Dsonar.projectKey=rollingjungle_david-sonar-xwiki \ + -Dsonar.organization=rollingjungle \ + -Dsonar.host.url=https://sonarcloud.io From 35a3c2e53ede312b286eb0d9d927c6702b8049dd Mon Sep 17 00:00:00 2001 From: RollingJungle <43827155+RollingJungle@users.noreply.github.com> Date: Sun, 8 Mar 2026 22:31:49 -0400 Subject: [PATCH 07/11] Update AbstractScriptingStore.java Remove Depreciated Code --- .../org/xwiki/crypto/script/AbstractScriptingStore.java | 6 ------ 1 file changed, 6 deletions(-) diff --git a/xwiki-platform-core/xwiki-platform-crypto/xwiki-platform-crypto-script/src/main/java/org/xwiki/crypto/script/AbstractScriptingStore.java b/xwiki-platform-core/xwiki-platform-crypto/xwiki-platform-crypto-script/src/main/java/org/xwiki/crypto/script/AbstractScriptingStore.java index ff68cf012af..cfa5a5679d8 100644 --- a/xwiki-platform-core/xwiki-platform-crypto/xwiki-platform-crypto-script/src/main/java/org/xwiki/crypto/script/AbstractScriptingStore.java +++ b/xwiki-platform-core/xwiki-platform-crypto/xwiki-platform-crypto-script/src/main/java/org/xwiki/crypto/script/AbstractScriptingStore.java @@ -36,12 +36,6 @@ */ public abstract class AbstractScriptingStore { - /** - * @deprecated use {@link StandardCharsets#UTF_8} instead - */ - @Deprecated - protected static final Charset UTF8 = Charset.forName("UTF-8"); - protected StoreReference storeReference; private ContextualAuthorizationManager contextualAuthorizationManager; From 87644ee8ae707b6f4433d94fda3056476db4b529 Mon Sep 17 00:00:00 2001 From: RollingJungle <43827155+RollingJungle@users.noreply.github.com> Date: Sun, 8 Mar 2026 22:42:27 -0400 Subject: [PATCH 08/11] Delete .github/workflows/sonarcloud.yml Dont need this --- .github/workflows/sonarcloud.yml | 65 -------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/sonarcloud.yml diff --git a/.github/workflows/sonarcloud.yml b/.github/workflows/sonarcloud.yml deleted file mode 100644 index 473b8de82aa..00000000000 --- a/.github/workflows/sonarcloud.yml +++ /dev/null @@ -1,65 +0,0 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. - -# This workflow helps you trigger a SonarCloud analysis of your code and populates -# GitHub Code Scanning alerts with the vulnerabilities found. -# Free for open source project. - -# 1. Login to SonarCloud.io using your GitHub account - -# 2. Import your project on SonarCloud -# * Add your GitHub organization first, then add your repository as a new project. -# * Please note that many languages are eligible for automatic analysis, -# which means that the analysis will start automatically without the need to set up GitHub Actions. -# * This behavior can be changed in Administration > Analysis Method. -# -# 3. Follow the SonarCloud in-product tutorial -# * a. Copy/paste the Project Key and the Organization Key into the args parameter below -# (You'll find this information in SonarCloud. Click on "Information" at the bottom left) -# -# * b. Generate a new token and add it to your Github repository's secrets using the name SONAR_TOKEN -# (On SonarCloud, click on your avatar on top-right > My account > Security -# or go directly to https://sonarcloud.io/account/security/) - -# Feel free to take a look at our documentation (https://docs.sonarcloud.io/getting-started/github/) -# or reach out to our community forum if you need some help (https://community.sonarsource.com/c/help/sc/9) - -name: SonarCloud analysis - -on: - push: - branches: [ "david-develop-branch" ] - pull_request: - branches: [ "master" ] - workflow_dispatch: - -permissions: - pull-requests: read # allows SonarCloud to decorate PRs with analysis results - -jobs: - Analysis: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - cache: 'maven' - - - name: Build Crypto Module and Scan - env: - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - run: | - mvn -pl xwiki-platform-core/xwiki-platform-crypto install -DskipTests - mvn -pl xwiki-platform-core/xwiki-platform-crypto sonar:sonar \ - -Dsonar.projectKey=rollingjungle_david-sonar-xwiki \ - -Dsonar.organization=rollingjungle \ - -Dsonar.host.url=https://sonarcloud.io From 1ff2be954a2364ee40aba85b69dcad265d6c1c59 Mon Sep 17 00:00:00 2001 From: Irtaza Syed Date: Mon, 9 Mar 2026 15:24:06 -0400 Subject: [PATCH 09/11] chore: test commit --- sonar-project.properties | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 00000000000..06e100720ad --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,12 @@ +# Unique identifiers from your SonarCloud project setup +sonar.projectKey=your_project_key +sonar.organization=your_org_name +sonar.host.url=https://sonarcloud.io + +# TARGETING: This is the most important part +# Only scan the 'oldcore' module to save time and line-count +sonar.sources=xwiki-platform-core/xwiki-platform-oldcore/src/main/java +sonar.java.binaries=target/classes + +# EXCLUSIONS: Skip tests and third-party code to keep the report clean +sonar.exclusions=**/test/**, **/target/** \ No newline at end of file From 335ceb18697a1a9264cc91494f18381fd4a7dd5a Mon Sep 17 00:00:00 2001 From: Irtaza Syed Date: Mon, 9 Mar 2026 17:29:00 -0400 Subject: [PATCH 10/11] refactor: change method visibility in PageTemplatesIT setup method --- .../it/org/xwiki/administration/test/ui/PageTemplatesIT.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/PageTemplatesIT.java b/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/PageTemplatesIT.java index d2992e37121..2237ba0bf28 100644 --- a/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/PageTemplatesIT.java +++ b/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-test/xwiki-platform-administration-test-docker/src/test/it/org/xwiki/administration/test/ui/PageTemplatesIT.java @@ -78,7 +78,7 @@ class PageTemplatesIT public static final String TEMPLATE_NAME = "TestTemplate"; @BeforeEach - public void setup(TestUtils setup) + void setup(TestUtils setup) { setup.loginAsSuperAdmin(); } From c584f681855d328e6231b54e31607c1d2b841f86 Mon Sep 17 00:00:00 2001 From: Irtaza Syed Date: Mon, 9 Mar 2026 18:01:17 -0400 Subject: [PATCH 11/11] chore: remove sonar-project.properties file --- sonar-project.properties | 12 ------------ 1 file changed, 12 deletions(-) delete mode 100644 sonar-project.properties diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 06e100720ad..00000000000 --- a/sonar-project.properties +++ /dev/null @@ -1,12 +0,0 @@ -# Unique identifiers from your SonarCloud project setup -sonar.projectKey=your_project_key -sonar.organization=your_org_name -sonar.host.url=https://sonarcloud.io - -# TARGETING: This is the most important part -# Only scan the 'oldcore' module to save time and line-count -sonar.sources=xwiki-platform-core/xwiki-platform-oldcore/src/main/java -sonar.java.binaries=target/classes - -# EXCLUSIONS: Skip tests and third-party code to keep the report clean -sonar.exclusions=**/test/**, **/target/** \ No newline at end of file