You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Angela Schreiber (Jira)" <ji...@apache.org> on 2021/06/29 08:24:00 UTC

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

Angela Schreiber created SLING-10571:
----------------------------------------

             Summary: 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


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.3.4#803005)