Uploaded image for project: 'Shindig'
  1. Shindig
  2. SHINDIG-1923

ClassCastException: org.apache.shindig.common.uri.Uri cannot be cast to java.lang.String

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.5.0-beta6
    • 2.5.1, 2.5.0-update1
    • None
    • None

    Description

      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?

      Attachments

        Activity

          People

            rbaxter Ryan Baxter
            objectiser Gary Brown
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: