axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (AXIS2-241) AXIOM exposes interface functions that should be implementation details
Date Fri, 23 Sep 2005 23:50:28 GMT
     [ http://issues.apache.org/jira/browse/AXIS2-241?page=all ]
     
Davanum Srinivas resolved AXIS2-241:
------------------------------------

    Resolution: Fixed

Extracted those methods into 2 internal interfaces OMNodeEx and OMContainerEx and typecasted
whereever needed. 

> AXIOM exposes interface functions that should be implementation details
> -----------------------------------------------------------------------
>
>          Key: AXIS2-241
>          URL: http://issues.apache.org/jira/browse/AXIS2-241
>      Project: Apache Axis 2.0 (Axis2)
>         Type: Improvement
>   Components: om
>     Versions: 0.91
>     Reporter: Eric Johnson

>
> The OMNode interface includes functions like:
>     public void setNextSibling(OMNode node);
>     public void setPreviousSibling(OMNode previousSibling);
>     public void setParent(OMContainer element);
>     public void setComplete(boolean state);
>     public void setType(int nodeType) throws OMException;
> OMContainer includes:
>     public void setComplete(boolean state);
>     public void setFirstChild(OMNode omNode);
> The availability of these functions in the interface means that clients can accidentally
or intentionally misbehave and corrupt the data structures.
> For example, intentional corruption:
> OMNode next = om.getNextSibling();
> om.detach();
> next.setPreviousSibling(om);
> Or the accidental:
> OMElement parent = theParent;
> OMNode lastChild = parent.getLastChild();
> lastChild.setNextSibling(theNewSibling);  // you might reasonably think that this will
insert into parent!
> Where possible, these functions ought to be defined in a package visible interface particular
to the implementation package, so that only the implementation can alter crucial details that
affect the integrity of the tree structure.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


Mime
View raw message