[
https://issues.apache.org/jira/browse/ODFTOOLKIT-187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16171373#comment-16171373
]
Svante Schubert commented on ODFTOOLKIT-187:
--------------------------------------------
As the problem results from dumping two Java hash sets the bug is potentially
related to the hashing function.
After enhancing the hash function of the Java Set content, ie. PuzzlePiece.java
the random buggy behaviour did not happen to me again.
BEFORE:
public int hashCode() {
return mExpression.hashCode();
}
AFTER:
public int hashCode() {
return 1013 * (mName.hashCode()) ^ 1009 *
(mExpression.hashCode());
}
> ODF Java model based on MSV tree has a random factor
> ----------------------------------------------------
>
> Key: ODFTOOLKIT-187
> URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-187
> Project: ODF Toolkit
> Issue Type: Bug
> Components: codegen
> Affects Versions: odfdom-0.8.7
> Environment: Operating System: All
> Platform: All
> Reporter: Svante Schubert
> Assignee: Svante Schubert
>
> As the test method testExtractPuzzlePiecesWithDuplicates() of PuzzlePieceTest
> reveals varies the number of duplicates (with JDK 5).
> The new MSV engine did not solve this problem, therefore we have to
> investigate further what are the changes.
> Are you able to have a look into this after the review of my work on the MSV,
> where you might base your approach on, Devin?
> Regards,
> Svante
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)