thomasmueller commented on PR #1667:
URL: https://github.com/apache/jackrabbit-oak/pull/1667#issuecomment-2309413333

   Yes, it guarantees entries to be unique, by removing keys if the same value 
was added.
   
   ```
           BidiMap<String, String> map = new DualHashBidiMap<>();
           map.put("key1", "value1");
           map.put("key2", "value2");
           map.put("key3", "valueA");
           map.put("key4", "valueA");
           assertEquals("value1", map.get("key1"));
           assertEquals("value2", map.get("key2"));
           assertEquals(null, map.get("key3"));
           assertEquals("valueA", map.get("key4"));
   
   ```
   
   But at least in the BlobThroughPutTest.java this behavior doesn't seem to be 
used. And inverseBidiMap doesn't seem to be used. So it seems a regular hash 
map is sufficient there.
   
   I didn't check the other usage.
   


-- 
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