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


##########
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:
   @rootvector2 
   
   Thank you for the update. You forgot to add tests for the other concrete 
subclasses of the two abstract classes this PR modifies.
   
   



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