[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-1616) org.hibernate.tuple.ElementWrapper has 6 Java scoping errors which break updating a lazy-loaded DOM4J Element
Jay Schrock (JIRA)
noreply at atlassian.com
Wed Aug 15 13:22:14 EDT 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-1616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_27845 ]
Jay Schrock commented on HHH-1616:
----------------------------------
Why is this issue still unassigned, Created March 2006 ?
> org.hibernate.tuple.ElementWrapper has 6 Java scoping errors which break updating a lazy-loaded DOM4J Element
> -------------------------------------------------------------------------------------------------------------
>
> Key: HHH-1616
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-1616
> Project: Hibernate3
> Issue Type: Bug
> Components: core
> Affects Versions: 3.2.0 cr1
> Environment: Any
> Reporter: John Spackman
> Attachments: ElementWrapper.java
>
> Original Estimate: 0 minutes
> Remaining Estimate: 0 minutes
>
> The class has a member variable called "element" which is the DOM4J element that is being wrapped; 6 of the methods in ElementWrapper (from the Element interface) have parameters also called "element" and the scoping is not corrected to use the wrapped "element".
> EG, calling the method "add" to add a new child element will make the child a child of itself and *not* connect it to the wrapped element. See snippet below
> public class ElementWrapper implements Element, Serializable {
> private Element element;
> private Element parent;
> // ...snip...
> public void add(Element element) {
> // BUG: Should be this.element.add(..)
> element.add( element );
> }
> // ...snip...
> }
> This methods affected are:
> getPath
> getUniquePath
> asXPathResult
> appendAttributes
> add(Element element)
> remove(Element element)
> Attached is a fixed version, with comments by my changes.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list