Bugs item #3547635, was opened at 2012-07-23 07:41 Message generated for change (Tracker Item Submitted) made by mischi You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=3547635&group_id=16035
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: dom4j 2.0 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Michael Pradel (mischi) Assigned to: Nobody/Anonymous (nobody) Summary: BeanElement throws exception whereas DefaultElement doesn't Initial Comment: We get a ClassCastException when using a DefaultElement that happens to be a BeanElement. The exception doesn't occur with DefaultElement. A minimal example: void m(DefaultElement elem, QName name) { elem.addAttribute(name, "value"); } The following works fine: m(new DefaultElement(name), name); But this fails: m(new BeanElement(name), name); The behavior of BeanElement diverges from the superclass behavior, which is very surprising here. The problem is that DefaultElement initializes its 'attributes' field with a LazyList, but BeanElement expects the field to be a BeanAttributeList. Am I right when guessing that BeanElement should initialize the field with a BeanAttributeList? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=116035&aid=3547635&group_id=16035 ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ dom4j-dev mailing list dom4j-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dom4j-dev