You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@shindig.apache.org by "Ryan Baxter (JIRA)" <ji...@apache.org> on 2013/08/01 17:01:58 UTC

[jira] [Comment Edited] (SHINDIG-1923) ClassCastException: org.apache.shindig.common.uri.Uri cannot be cast to java.lang.String

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

Ryan Baxter edited comment on SHINDIG-1923 at 8/1/13 3:00 PM:
--------------------------------------------------------------

Good catch Gary.  I think we should probably change the API to Map<String, Uri>.  Would you be interested in contributing a patch to fix this?

Also another question.  We on the verge of releasing 2.5.0.  The release candidate is in the process of being verified.  Would you need this in 2.5.0?  I am willing to do another release immediately after 2.5.0 with this fix in it.
                
      was (Author: rbaxter):
    Good catch Gary.  I think we should probably change the API to Map<String, Uri>.  Would you be interrested in contributing a patch to fix this?

Also another question.  We on the verge of releasing 2.5.0.  The release candidate is in the process of being verified.  Would you need this in 2.5.0?  I am willing to do another release immediately after 2.5.0 with this fix in it.
                  
> ClassCastException: org.apache.shindig.common.uri.Uri cannot be cast to java.lang.String
> ----------------------------------------------------------------------------------------
>
>                 Key: SHINDIG-1923
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-1923
>             Project: Shindig
>          Issue Type: Bug
>    Affects Versions: 2.5.0-beta6
>            Reporter: Gary Brown
>
> I recently upgraded from 3.0.0-beta4 to 2.5.0-beta6, and found that the MetadataResponse had changed from getIframeUrl to getIframeUrls (Map<String,String>). However when I try accessing the value in this map I am getting a ClassCastException.
> When looking in the code I noticed,
> https://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerApi.java
> the MetadataResponse inner class has a method getIframeUrls() with return type Map<String,String>.
> However in:
> https://svn.apache.org/repos/asf/shindig/trunk/java/gadgets/src/main/java/org/apache/shindig/gadgets/servlet/GadgetsHandlerService.java
> the method getMetadata() shows the urls are defined as type Map<String,Uri>.
> As the MetadataResponse API has been changed anyway, could it not just be changed to Map<String,Uri>? Or alternatively transform the map inside the GadgetsHandlerService?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira