You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2025/06/13 14:49:26 UTC

(commons-collections) branch master updated (44a4c0306 -> a056026a2)

This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git


    from 44a4c0306 Merge pull request #621 from apache/dependabot/github_actions/github/codeql-action-3.29.0
     new 8ba3d3445 Remove @SuppressWarnings
     new 13c099492 Use try-with-resources
     new a056026a2 Merge branch 'master' of https://github.com/apache/commons-collections.git

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../collections4/collection/CompositeCollectionTest.java       |  5 ++---
 .../org/apache/commons/collections4/map/MultiValueMapTest.java | 10 +++-------
 2 files changed, 5 insertions(+), 10 deletions(-)


(commons-collections) 02/03: Use try-with-resources

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 13c099492ab966d8e1f0c2f829d33e8d2543089d
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 13 10:48:48 2025 -0400

    Use try-with-resources
---
 .../org/apache/commons/collections4/map/MultiValueMapTest.java    | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
index e76e03573..406783d02 100644
--- a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
@@ -100,11 +100,9 @@ public class MultiValueMapTest<K, V> extends AbstractObjectTest {
 
     private byte[] serialize(final Object object) throws IOException {
         final ByteArrayOutputStream baos = new ByteArrayOutputStream();
-        final ObjectOutputStream oos = new ObjectOutputStream(baos);
-
-        oos.writeObject(object);
-        oos.close();
-
+        try (ObjectOutputStream oos = new ObjectOutputStream(baos)) {
+            oos.writeObject(object);
+        }
         return baos.toByteArray();
     }
 


(commons-collections) 03/03: Merge branch 'master' of https://github.com/apache/commons-collections.git

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit a056026a26ef4e5cba6ccffa47fea0ee499fda4b
Merge: 13c099492 44a4c0306
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 13 10:48:57 2025 -0400

    Merge branch 'master' of https://github.com/apache/commons-collections.git

 .github/workflows/codeql-analysis.yml     | 6 +++---
 .github/workflows/scorecards-analysis.yml | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)


(commons-collections) 01/03: Remove @SuppressWarnings

Posted by gg...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git

commit 8ba3d3445cc382f27bc5cf23213afab872f35dc4
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Fri Jun 13 10:47:47 2025 -0400

    Remove @SuppressWarnings
---
 .../commons/collections4/collection/CompositeCollectionTest.java     | 5 ++---
 .../java/org/apache/commons/collections4/map/MultiValueMapTest.java  | 2 --
 2 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java b/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java
index 9e2a1412b..4a02113a4 100644
--- a/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java
+++ b/src/test/java/org/apache/commons/collections4/collection/CompositeCollectionTest.java
@@ -101,7 +101,6 @@ public class CompositeCollectionTest<E> extends AbstractCollectionTest<E> {
         return new CompositeCollection<>();
     }
 
-    @SuppressWarnings("serial")
     protected void setUpMutatorTest() {
         setUpTest();
         c.setMutator(new CompositeCollection.CollectionMutator<E>() {
@@ -143,7 +142,7 @@ public class CompositeCollectionTest<E> extends AbstractCollectionTest<E> {
     }
 
     @Test
-    @SuppressWarnings({ "unchecked", "serial" })
+    @SuppressWarnings({ "unchecked" })
     void testAddAllMutator() {
         setUpTest();
         c.setMutator(new CompositeCollection.CollectionMutator<E>() {
@@ -194,7 +193,7 @@ public class CompositeCollectionTest<E> extends AbstractCollectionTest<E> {
     }
 
     @Test
-    @SuppressWarnings({ "unchecked", "serial" })
+    @SuppressWarnings({ "unchecked" })
     void testAddMutator() {
         setUpTest();
         c.setMutator(new CompositeCollection.CollectionMutator<E>() {
diff --git a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
index 6dcae7ad7..e76e03573 100644
--- a/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
+++ b/src/test/java/org/apache/commons/collections4/map/MultiValueMapTest.java
@@ -316,7 +316,6 @@ public class MultiValueMapTest<K, V> extends AbstractObjectTest {
     @Test
     @SuppressWarnings("unchecked")
     void testPutWithList() {
-        @SuppressWarnings("rawtypes")
         final MultiValueMap<K, V> test = MultiValueMap.multiValueMap(new HashMap<>(), ArrayList.class);
         assertEquals("a", test.put((K) "A", "a"));
         assertEquals("b", test.put((K) "A", "b"));
@@ -328,7 +327,6 @@ public class MultiValueMapTest<K, V> extends AbstractObjectTest {
     @Test
     @SuppressWarnings("unchecked")
     void testPutWithSet() {
-        @SuppressWarnings("rawtypes")
         final MultiValueMap<K, V> test = MultiValueMap.multiValueMap(new HashMap<>(), HashSet.class);
         assertEquals("a", test.put((K) "A", "a"));
         assertEquals("b", test.put((K) "A", "b"));