Skip to content

SLING-13127: Remove obsolete ImportOptions.setPatchKeepInRepo call#74

Open
bkkothari2255 wants to merge 1 commit into
apache:masterfrom
bkkothari2255:feature/SLING-13127-remove-patchinrepo
Open

SLING-13127: Remove obsolete ImportOptions.setPatchKeepInRepo call#74
bkkothari2255 wants to merge 1 commit into
apache:masterfrom
bkkothari2255:feature/SLING-13127-remove-patchinrepo

Conversation

@bkkothari2255
Copy link
Copy Markdown

Issue: SLING-13127

In Apache Jackrabbit FileVault version 4.2.0, the ability to patch files in the filesystem was completely removed as part of JCRVLT-825.

Because the setPatchKeepInRepo(boolean) method no longer exists in the newer FileVault API, leaving this method call in Sling will break the build (Method Not Found) when Sling attempts to upgrade its FileVault dependency.

Removing this now removes technical debt for a clean FileVault upgrade.

@sonarqubecloud
Copy link
Copy Markdown

@joerghoh
Copy link
Copy Markdown
Contributor

@kwin Is there a chance to enforce a hard dependency to at least Filevault 4.2.0, which has the Patch option removed? Because otherwise there is still the option to run this code with a filevault older than 4.2.0, and I would consider that as a security risk.

(Because if there is no chance to do that, I would close this ticket and not implement it.)

@bkkothari2255
Copy link
Copy Markdown
Author

@kwin Is there a chance to enforce a hard dependency to at least Filevault 4.2.0, which has the Patch option removed? Because otherwise there is still the option to run this code with a filevault older than 4.2.0, and I would consider that as a security risk.

(Because if there is no chance to do that, I would close this ticket and not implement it.)

@joerghoh @kwin That makes total sense regarding the security risk on older FileVault versions.

If you both agree it's the right path forward, I can bump the org.apache.jackrabbit.vault dependency version to 4.2.0 (or higher) in the pom.xml as part of this PR. The maven-bundle-plugin should then automatically generate the strict Import-Package range to enforce the hard dependency.

Just let me know if you would like me to add that

@joerghoh
Copy link
Copy Markdown
Contributor

joerghoh commented Mar 3, 2026

hi @bkkothari2255 I doubt that it's that easy, unless filevault 4.2.0 added some package dependency updates, which cannot be fulfilled by an 4.1.4 (the previous version).

apache/jackrabbit-filevault@jackrabbit-filevault-4.1.4...jackrabbit-filevault-4.2.0 shows for the package-info.java files only a change in formatting, not in any version number.

For that just updating the filevault-core dependency to 4.2.0 is not good enough.

@bkkothari2255
Copy link
Copy Markdown
Author

hi @bkkothari2255 I doubt that it's that easy, unless filevault 4.2.0 added some package dependency updates, which cannot be fulfilled by an 4.1.4 (the previous version).

apache/jackrabbit-filevault@jackrabbit-filevault-4.1.4...jackrabbit-filevault-4.2.0 shows for the package-info.java files only a change in formatting, not in any version number.

For that just updating the filevault-core dependency to 4.2.0 is not good enough.

@joerghoh Great catch! I checked the source and you're right—the package version remained 2.16.0 in FileVault 4.2.0 despite the breaking API change. Because of this, standard OSGi won't generate the strict Import-Package we need.

@kwin Since we can't rely on the package version to enforce the secure engine, should we use a strict Require-Bundle as a workaround here, or just hold this PR until FileVault releases a corrected package version?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants