You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Carsten Ziegeler (Jira)" <ji...@apache.org> on 2022/05/13 12:32:00 UTC

[jira] [Updated] (SLING-10571) Hardcoded application paths in VaultPackageUtils.detectPackageType

     [ https://issues.apache.org/jira/browse/SLING-10571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carsten Ziegeler updated SLING-10571:
-------------------------------------
    Fix Version/s:     (was: Content-Package to Feature Model Converter 1.1.16)

> Hardcoded application paths in VaultPackageUtils.detectPackageType
> ------------------------------------------------------------------
>
>                 Key: SLING-10571
>                 URL: https://issues.apache.org/jira/browse/SLING-10571
>             Project: Sling
>          Issue Type: Bug
>          Components: Content-Package to Feature Model Converter
>            Reporter: Angela Schreiber
>            Priority: Minor
>              Labels: technical_debt
>
> while investigating SLING-10467 i noticed hardcoded paths for what should be considered application content in {{VaultPackageUtils.detectPackageType}}.
> the method looks as follows:
> {code}
> public static @NotNull PackageType detectPackageType(String path) {
>         if ("/apps".equals(path)
>                 || path.startsWith("/apps/")
>                 || "/libs".equals(path)
>                 || path.startsWith("/libs/")) {
>             return PackageType.APPLICATION;
>         } else {
>             return PackageType.CONTENT;
>         }
>     }
> {code}
> instead of hardcoding /apps and /libs which are details of Adobe AEM, these paths should be configured with the converter-launcher. in particular since the list looks a bit arbitrary as there are other paths that IMHO should be considered application content like nodetype registry, namespace registry, privilege registry, service users etc.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)