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

JsonDbOpensocialService#createMessage() improperly accesses the message collection

    XMLWordPrintableJSON

Details

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

    Description

      (Spin-off from SHINDIG-1951 containing only the fixes to #createMessage(), without the API change)

      Calling #createMessage() leads to errors like this:

      org.apache.shindig.protocol.ProtocolException: JSONObject["jane.doe"] is not a JSONArray.
              at org.json.JSONObject.getJSONArray(JSONObject.java:502)
              at org.apache.shindig.social.sample.spi.JsonDbOpensocialService.createMessage(JsonDbOpensocialService.java:621)
      
      Message msg = new MessageImpl();
      msg.setBody("Hello");
      msg.setRecipients(Collections.singletonList(JANE_DOE.getUserId()));
      db.createMessage(JOHN_DOE, APP_ID, "privateMessage", msg, token).get();
      

      Attachments

        Issue Links

          Activity

            People

              ankon Andreas Kohn
              ankon Andreas Kohn
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: