You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by GitBox <gi...@apache.org> on 2022/03/14 20:53:11 UTC

[GitHub] [commons-collections] nhojpatrick commented on a change in pull request #291: [COLLECTIONS-809] JUnit v5 assertThrows

nhojpatrick commented on a change in pull request #291:
URL: https://github.com/apache/commons-collections/pull/291#discussion_r826367913



##########
File path: src/test/java/org/apache/commons/collections4/map/TransformedSortedMapTest.java
##########
@@ -77,18 +79,15 @@ public void testTransformedMap() {
             map.put((K) els[i], (V) els[i]);
             assertEquals(i + 1, map.size());
             assertTrue(map.containsKey(Integer.valueOf((String) els[i])));
-            try {
-                map.containsKey(els[i]);
-                fail();
-            } catch (final ClassCastException ex) {}
+            SortedMap<K, V> finalMap1 = map;
+            int finalI = i;

Review comment:
       Otherwise you get this error "Variable used in lambda expression should be final or effectively final"




-- 
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: issues-unsubscribe@commons.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org