Sujishark commented on PR #556:
URL: https://github.com/apache/opennlp/pull/556#issuecomment-1819541012

   Greetings, 
   
   I've added the environment details. 
   
   A similar issue was already addressed in this PR:  
https://github.com/apache/opennlp/pull/387 
   
   The change I made is because in the `equals` method designed for comparing 
elements within a Set, the ordering of the elements is also checked for the Set.
   
   
https://github.com/apache/opennlp/blob/dab19af803e9139b57b972eb4e1af4c978d2ff3f/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java#L356
   
   The `entrySet` here is a HashSet which doesn't maintain a constant order as 
mentioned in the 
[Java_17_documentation](https://docs.oracle.com/en/java/javase/17/docs/api/java.base/java/util/HashSet.html).
 
   
   
https://github.com/apache/opennlp/blob/dab19af803e9139b57b972eb4e1af4c978d2ff3f/opennlp-tools/src/main/java/opennlp/tools/dictionary/Dictionary.java#L95
   
   I've made changes only to the test files now without altering the actual 
code.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to