[ 
https://issues.apache.org/jira/browse/SLING-5653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15232120#comment-15232120
 ] 

Julian Sedding commented on SLING-5653:
---------------------------------------

[~rombert] can you check please if the Object you get in the debugger is the 
same as 
[TagData#REQUEST_TIME_VALUE|https://docs.oracle.com/javaee/7/api/javax/servlet/jsp/tagext/TagData.html#REQUEST_TIME_VALUE]?
 I.e. {{val == TagData.REQUEST_TIME_VALUE}}.

The javadoc for {{TagData.REQUEST_TIME_VALUE}} says:
bq. Distinguished value for an attribute to indicate its value is a 
request-time expression (which is not yet available because TagData instances 
are used at translation-time).

> 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