Community
Participate
Working Groups
UML2 Superstructure 2.1 says: "An end property of an association that is owned by an end class or that is a navigable owned end of the association indicates that the association is navigable from the opposite ends, otherwise the association is not navigable from the opposite ends." The current implementation of PropertyOperations.getOpposite does only return an opposite end if the given property is not owned by an association and therefore does not obey the specificatio in this point (it does indeed also contradict the javadoc-comment given in org.eclipse.uml2.uml.Property.getOpposite()). I would therefore suppose to alter the implementation of PropertyOperations.getOppsosite() - to at least support that for navigable associations getOpposite can also be used if the property is owned by the association - as follows: public static Property getOpposite(Property property) { if ((property.getOwningAssociation() != null && property.getOwningAssociation().isBinary() && property.isNavigable()) || property.getOwningAssociation() == null) { Property otherEnd = getOtherEnd(property); if (otherEnd != null && otherEnd.isNavigable()) { return otherEnd; } } return null; }
The fix has been committed to CVS.
Fixed in M200609210850.
Move to verified as per bug 206558.