This is an automated email from the ASF dual-hosted git repository.
garydgregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-collections.git
The following commit(s) were added to refs/heads/master by this push:
new 188af4855 [COLLECTIONS-898] AbstractSetTest cannot be used with an
explicitly typed Set (unless it's based on String) (#727)
188af4855 is described below
commit 188af48550f0a8821198c3076c4fddf81e2b6272
Author: Thomas Mortagne <[email protected]>
AuthorDate: Tue Aug 25 22:56:52 2026 +0200
[COLLECTIONS-898] AbstractSetTest cannot be used with an explicitly typed
Set (unless it's based on String) (#727)
* pick a valid element from getFullElements() instead of adding an
hardcoded String
---
src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
index e16218637..2c9d06f59 100644
--- a/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
+++ b/src/test/java/org/apache/commons/collections4/set/AbstractSetTest.java
@@ -124,7 +124,7 @@ public abstract class AbstractSetTest<E> extends
AbstractCollectionTest<E> {
verify();
final Collection<E> set2 = makeConfirmedCollection();
- set2.add((E) "foo");
+ set2.add(getFullElements()[0]);
assertFalse(getCollection().equals(set2), "Empty set shouldn't equal
nonempty set");
resetFull();