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

Radu Cotescu updated SLING-4282:
--------------------------------
    Attachment: SLING-4282.patch

The attached patch ([^SLING-4282.patch]) makes sure the 
{{SightlyJavaCompilerService}} generates all possible repository paths for 
fully qualified class names identifying POJOs stored in JCR given the character 
replacements when transforming repository paths into valid Java package names 
and back.

Two unit tests make sure that POJOs from JCR paths containing characters that 
need to be replaced for generating valid java names are identified and loaded 
correctly.

> [Sightly] Fully qualified Use POJOs are not correctly identified in the 
> repository
> ----------------------------------------------------------------------------------
>
>                 Key: SLING-4282
>                 URL: https://issues.apache.org/jira/browse/SLING-4282
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>            Reporter: Radu Cotescu
>             Fix For: Scripting Sightly Engine 1.0.0
>
>         Attachments: SLING-4282.patch
>
>
> Fully qualified POJOs in {{data-sly-use}} may not be correctly identified in 
> the JCR repository if the paths where they are stored contain dashes or 
> underscores due to Java class name restrictions.
> The code used for detecting the location of classes that have underscores in 
> their names should search for repository paths containing both "-" and "_".
> Example:
> {code:html}
> <div data-sly-use.obj="apps.my_project.components.Pojo">...</div>
> {code}
> could identify the following paths:
> # {{/apps/my_project/components/Pojo.java}}
> # {{/apps/my-project/components/Pojo.java}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to