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


##########
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:
   Hello @rootvector2 
   Thank you for your update.
   I now realize this teste doesn't look right. The PR modifies two abstract 
classes. This test is in one of the concrete subclasses for only two 
subclasses. Instead, there should be one new test method in each concrete 
subclasses' Test class.
   



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