https://issues.apache.org/bugzilla/show_bug.cgi?id=47668


Stefan Stern <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|FIXED                       |


--- Comment #4 from Stefan Stern <[email protected]> 2009-08-14 06:31:44 
PDT ---
>  - entries in the context are keyed by PackageRelationship, not by 
> PackagePart.
> PackageRelationship is more appropriate as it overrides hashCode() and 
> equals()

PackageRelationship.hashCode method makes use of the ID of the relationship.
This will most likely always result in different hashes for different
PackageRelationship-objects, although these refer to the same PackagePart. 

In the context-map and context-set for loading and writing, the hashcode is
used when adding and checking whether element is already contained in list. 

Result is a very similiar behavior then before: each PackagePart has several
instances in memory, means I can find more than one XSLFSlide object for the
same PackagePart '/ppt/slide/slide1.xml', each one referenced by another part
(notesPart, slideMasterPart, etc). 

The only benefit now is, that each PackageRelationship-instance is added only
once, so there is not an endless-loop any more. 

Is there a major benefit in using PackageRelationship instead of the
PackagePart itself? Or is there a need to instantiate more than one XSLFSLide
object for the very same Slide-PackagePart?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to