Uploaded image for project: 'Spring Web Services'
  1. Spring Web Services
  2. SWS-361

XStream.addImplicitCollection not supported by XStreamMarshaller

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5, 1.5.1, 1.5.2
    • Fix Version/s: 1.5.3
    • Component/s: OXM
    • Labels:
      None

      Activity

      ddr David DUTOUR created issue -
      Hide
      ddr David DUTOUR added a comment -

      Code to add to support ImplicitCollection in XStreamMarshaller

      ------ CODE -----
      /**

      • Adds an implicit Collection for the given type.
        *
      • @param name alias to be used for the type
      • @param type the type to be Collection
        */
        public void addImplicitCollection(String name, Class type) { getXStream().addImplicitCollection(type, name); }

      /**

      • Set a implicit colletion/type map, consisting of string implicit collection mapped to <code>Class</code>
      • instances (or Strings to be converted to <code>Class</code> instances).
        *
      • @see org.springframework.beans.propertyeditors.ClassEditor
        */
        public void setImplicitCollection(Map implicitCollection) {
        for (Iterator iterator = implicitCollection.entrySet().iterator(); iterator.hasNext()
        Unknown macro: { Map.Entry entry = (Map.Entry) iterator.next(); Class type; if (entry.getValue() instanceof Class) { type = (Class) entry.getValue(); } else { ClassEditor editor = new ClassEditor(); editor.setAsText(String.valueOf(entry.getValue())); type = (Class) editor.getValue(); } addImplicitCollection((String) entry.getKey(), type); }

        }

            • END CODE -----
      Show
      ddr David DUTOUR added a comment - Code to add to support ImplicitCollection in XStreamMarshaller ------ CODE ----- /** Adds an implicit Collection for the given type. * @param name alias to be used for the type @param type the type to be Collection */ public void addImplicitCollection(String name, Class type) { getXStream().addImplicitCollection(type, name); } /** Set a implicit colletion/type map, consisting of string implicit collection mapped to <code>Class</code> instances (or Strings to be converted to <code>Class</code> instances). * @see org.springframework.beans.propertyeditors.ClassEditor */ public void setImplicitCollection(Map implicitCollection) { for (Iterator iterator = implicitCollection.entrySet().iterator(); iterator.hasNext() Unknown macro: { Map.Entry entry = (Map.Entry) iterator.next(); Class type; if (entry.getValue() instanceof Class) { type = (Class) entry.getValue(); } else { ClassEditor editor = new ClassEditor(); editor.setAsText(String.valueOf(entry.getValue())); type = (Class) editor.getValue(); } addImplicitCollection((String) entry.getKey(), type); } } END CODE -----
      arjen.poutsma Arjen Poutsma made changes -
      Field Original Value New Value
      Fix Version/s 1.5.3 [ 10982 ]
      arjen.poutsma Arjen Poutsma made changes -
      Resolution Fixed [ 1 ]
      Status Open [ 1 ] Resolved [ 5 ]
      Hide
      arjen.poutsma Arjen Poutsma added a comment -

      Closing issues in 1.5.3

      Show
      arjen.poutsma Arjen Poutsma added a comment - Closing issues in 1.5.3
      arjen.poutsma Arjen Poutsma made changes -
      Status Resolved [ 5 ] Closed [ 6 ]
      Transition Time In Source Status Execution Times Last Executer Last Execution Date
      Open Open Resolved Resolved
      20d 22h 10m 1 Arjen Poutsma 12/Jun/08 9:23 PM
      Resolved Resolved Closed Closed
      39d 43m 1 Arjen Poutsma 21/Jul/08 10:07 PM

        People

        • Assignee:
          arjen.poutsma Arjen Poutsma
          Reporter:
          ddr David DUTOUR
        • Votes:
          0 Vote for this issue
          Watchers:
          0 Start watching this issue

          Dates

          • Created:
            Updated:
            Resolved: