rootvector2 commented on code in PR #691:
URL: 
https://github.com/apache/commons-collections/pull/691#discussion_r3454073123


##########
src/test/java/org/apache/commons/collections4/map/HashedMapTest.java:
##########
@@ -85,4 +90,20 @@ void testInternalState() {
         // the threshold has changed due to calling ensureCapacity
         assertEquals(96, map.threshold);
     }
+
+    /**
+     * A crafted stream can carry a load factor the constructor rejects. 
AbstractHashedMap and
+     * AbstractReferenceMap (its own doReadObject override) must reapply that 
contract on read.
+     */
+    @ParameterizedTest
+    @ValueSource(floats = {0.0f, -1.0f, Float.NaN})
+    void testDeserializeRejectsInvalidLoadFactor(final float badLoadFactor) {

Review Comment:
   added them: `CaseInsensitiveMapTest`, `LinkedMapTest` and `LRUMapTest` on 
the `AbstractHashedMap` side, and `ReferenceIdentityMapTest` on the 
`AbstractReferenceMap` side. each one is a small method using the shared 
`serializeDeserialize` helper rather than copy-pasted boilerplate.



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