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

Robert Munteanu updated SLING-5653:
-----------------------------------
    Attachment: SLING-5653-unexpected-object.png

Debugging it seems that the actual value that ends up in the {{AdaptToTEI}} 
class is a simple {{java.lang.Object}} ( see attached 
[^SLING-5653-unexpected-object.png] ).

[~jsedding], [~klcodanr], [~justinedelson] , any thoughts on this bug?

> adaptTo tag fails when adaptTo parameter is an expression
> ---------------------------------------------------------
>
>                 Key: SLING-5653
>                 URL: https://issues.apache.org/jira/browse/SLING-5653
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting JSP-Taglib 2.2.4
>            Reporter: Robert Munteanu
>             Fix For: Scripting JSP-Taglib 2.2.6
>
>         Attachments: SLING-5653-unexpected-object.png
>
>
> The following code sample fails:
> {code:java}
> <c:set var="dest" value="org.apache.sling.api.resource.ValueMap"/> 
> <sling:adaptTo adaptable="${resource}" adaptTo="${dest}" var="props5"/>
> {code}
> Root cause seems to be
> {noformat}Caused by: java.lang.ClassCastException: java.lang.Object cannot be 
> cast to java.lang.String
>       at javax.servlet.jsp.tagext.TagData.getAttributeString(TagData.java:138)
>       at 
> org.apache.sling.scripting.jsp.taglib.tei.AdaptToTEI.getClassName(AdaptToTEI.java:26){noformat}



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

Reply via email to