Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-1117

BetwixtTransformer does not marshal Collections properly (java.lang.OutOfMemoryError)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.4
    • None
    • Blocks: (Undefined)
    • None
    • Operating System: other
      Platform: Other
    • 28209

    Description

      in BetwixtTransformer code (around line 256), some steps have been forgotten
      when handling Iterator on Collection objects. This results in a
      java.lang.OutOfMemoryError.

      // fix
      if (bean instanceof Collection) {
        Iterator i = ((Collection) bean).iterator();
        while (i.hasNext()) {
          Object o = i.next(); // the missing part
          if (element == null) {
             beanWriter.write(o); // instead of beanWriter.write(bean)
          } else {
             beanWriter.write(element, o); // idem
          }
        }
      }

      Attachments

        Activity

          People

            Unassigned Unassigned
            enrico.maccias@free.fr Enrico Maccias (lai-lai-lai-lai-lai lai-lai)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: