diff options
author | Volkmar W. Pogatzki <gentoo@pogatzki.net> | 2024-03-28 13:18:09 +0100 |
---|---|---|
committer | Miroslav Šulc <fordfrog@gentoo.org> | 2024-03-31 10:31:09 +0200 |
commit | 5c7991bdf575a7d7abc8436593f4787eaa6ff42d (patch) | |
tree | c61db6b4645b438b78febcab4936947186a75728 /dev-java/commons-beanutils/files | |
parent | app-emacs/jinx: Stabilize 1.3 amd64, #928244 (diff) | |
download | gentoo-5c7991bdf575a7d7abc8436593f4787eaa6ff42d.tar.gz gentoo-5c7991bdf575a7d7abc8436593f4787eaa6ff42d.tar.bz2 gentoo-5c7991bdf575a7d7abc8436593f4787eaa6ff42d.zip |
dev-java/commons-beanutils: fix test failures
Test sources of commons-collections-3.2.2 are needed for compiling the
test cases but are not part of the commons-collections.jar file.
Adds verify-sig
Closes: https://bugs.gentoo.org/923600
Signed-off-by: Volkmar W. Pogatzki <gentoo@pogatzki.net>
Closes: https://github.com/gentoo/gentoo/pull/35952
Signed-off-by: Miroslav Šulc <fordfrog@gentoo.org>
Diffstat (limited to 'dev-java/commons-beanutils/files')
-rw-r--r-- | dev-java/commons-beanutils/files/commons-collections-3.2.2-fixes.patch | 187 |
1 files changed, 187 insertions, 0 deletions
diff --git a/dev-java/commons-beanutils/files/commons-collections-3.2.2-fixes.patch b/dev-java/commons-beanutils/files/commons-collections-3.2.2-fixes.patch new file mode 100644 index 000000000000..2f1380a06ffc --- /dev/null +++ b/dev-java/commons-beanutils/files/commons-collections-3.2.2-fixes.patch @@ -0,0 +1,187 @@ +Patch stolen from: +From e90a6173247f06514731825677f3fc67c62bdc52 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Miroslav=20=C5=A0ulc?= <fordfrog@gentoo.org> +Date: Wed, 21 Apr 2021 11:31:11 +0200 +--- a/build.xml ++++ b/build.xml +@@ -154,8 +154,7 @@ + + <!-- NOTE: A jar built using JDK1.4 is incompatible with JDK1.2 --> + <jar jarfile="${build.jar.name}" +- basedir="${build.classes}" +- manifest="${build.conf}/MANIFEST.MF"/> ++ basedir="${build.classes}"/> + </target> + + <!-- ====================================================================== --> +--- a/src/java/org/apache/commons/collections/MultiHashMap.java ++++ b/src/java/org/apache/commons/collections/MultiHashMap.java +@@ -331,7 +331,7 @@ public class MultiHashMap extends HashMap implements MultiMap { + * @param item the value to remove + * @return the value removed (which was passed in), null if nothing removed + */ +- public Object remove(Object key, Object item) { ++ public Object removeMapping(Object key, Object item) { + Collection valuesForKey = getCollection(key); + if (valuesForKey == null) { + return null; +--- a/src/java/org/apache/commons/collections/MultiMap.java ++++ b/src/java/org/apache/commons/collections/MultiMap.java +@@ -66,7 +66,7 @@ public interface MultiMap extends Map { + * @throws ClassCastException if the key or value is of an invalid type + * @throws NullPointerException if the key or value is null and null is invalid + */ +- public Object remove(Object key, Object item); ++ public Object removeMapping(Object key, Object item); + + //----------------------------------------------------------------------- + /** +--- a/src/java/org/apache/commons/collections/map/MultiKeyMap.java ++++ b/src/java/org/apache/commons/collections/map/MultiKeyMap.java +@@ -197,7 +197,7 @@ public class MultiKeyMap + * @param key2 the second key + * @return the value mapped to the removed key, null if key not in map + */ +- public Object remove(Object key1, Object key2) { ++ public Object removeMultiKey(Object key1, Object key2) { + int hashCode = hash(key1, key2); + int index = map.hashIndex(hashCode, map.data.length); + AbstractHashedMap.HashEntry entry = map.data[index]; +--- a/src/java/org/apache/commons/collections/map/MultiValueMap.java ++++ b/src/java/org/apache/commons/collections/map/MultiValueMap.java +@@ -153,7 +153,7 @@ public class MultiValueMap extends AbstractMapDecorator implements MultiMap { + * @param value the value to remove + * @return the value removed (which was passed in), null if nothing removed + */ +- public Object remove(Object key, Object value) { ++ public Object removeMapping(Object key, Object value) { + Collection valuesForKey = getCollection(key); + if (valuesForKey == null) { + return null; +--- a/src/test/org/apache/commons/collections/TestMultiHashMap.java ++++ b/src/test/org/apache/commons/collections/TestMultiHashMap.java +@@ -217,7 +217,7 @@ public class TestMultiHashMap extends AbstractTestMap { + MultiHashMap one = new MultiHashMap(); + Integer value = new Integer(1); + one.put("One", value); +- one.remove("One", value); ++ one.removeMapping("One", value); + + MultiHashMap two = new MultiHashMap(); + assertEquals(two, one); +@@ -269,7 +269,7 @@ public class TestMultiHashMap extends AbstractTestMap { + assertEquals(4, map.totalSize()); + map.remove("A"); + assertEquals(3, map.totalSize()); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(2, map.totalSize()); + } + +@@ -292,7 +292,7 @@ public class TestMultiHashMap extends AbstractTestMap { + map.remove("A"); + assertEquals(0, map.size("A")); + assertEquals(3, map.size("B")); +- map.remove("B", "BC"); ++ map.removeMapping("B", "BC"); + assertEquals(0, map.size("A")); + assertEquals(2, map.size("B")); + } +@@ -464,11 +464,11 @@ public class TestMultiHashMap extends AbstractTestMap { + map.put("A", "AA"); + map.put("A", "AB"); + map.put("A", "AC"); +- assertEquals(null, map.remove("C", "CA")); +- assertEquals(null, map.remove("A", "AD")); +- assertEquals("AC", map.remove("A", "AC")); +- assertEquals("AB", map.remove("A", "AB")); +- assertEquals("AA", map.remove("A", "AA")); ++ assertEquals(null, map.removeMapping("C", "CA")); ++ assertEquals(null, map.removeMapping("A", "AD")); ++ assertEquals("AC", map.removeMapping("A", "AC")); ++ assertEquals("AB", map.removeMapping("A", "AB")); ++ assertEquals("AA", map.removeMapping("A", "AA")); + assertEquals(new MultiHashMap(), map); + } + +--- a/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java ++++ b/src/test/org/apache/commons/collections/collection/AbstractTestCollection.java +@@ -1116,7 +1116,7 @@ public abstract class AbstractTestCollection extends AbstractTestObject { + verify(); + + try { +- array = collection.toArray(null); ++ array = collection.toArray((Object[]) null); + fail("toArray(null) should raise NPE"); + } catch (NullPointerException e) { + // expected +--- a/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java ++++ b/src/test/org/apache/commons/collections/map/TestMultiKeyMap.java +@@ -315,10 +315,10 @@ public class TestMultiKeyMap extends AbstractTestIterableMap { + switch (key.size()) { + case 2: + assertEquals(true, multimap.containsKey(key.getKey(0), key.getKey(1))); +- assertEquals(value, multimap.remove(key.getKey(0), key.getKey(1))); ++ assertEquals(value, multimap.removeMultiKey(key.getKey(0), key.getKey(1))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); + assertEquals(size - 1, multimap.size()); +- assertEquals(null, multimap.remove(key.getKey(0), key.getKey(1))); ++ assertEquals(null, multimap.removeMultiKey(key.getKey(0), key.getKey(1))); + assertEquals(false, multimap.containsKey(key.getKey(0), key.getKey(1))); + break; + case 3: +--- a/src/test/org/apache/commons/collections/map/TestMultiValueMap.java ++++ b/src/test/org/apache/commons/collections/map/TestMultiValueMap.java +@@ -161,7 +161,7 @@ public class TestMultiValueMap extends TestCase { + MultiValueMap one = new MultiValueMap();
+ Integer value = new Integer(1);
+ one.put("One", value);
+- one.remove("One", value);
++ one.removeMapping("One", value);
+
+ MultiValueMap two = new MultiValueMap();
+ assertEquals(two, one);
+@@ -187,7 +187,7 @@ public class TestMultiValueMap extends TestCase { + assertEquals(4, map.totalSize());
+ map.remove("A");
+ assertEquals(3, map.totalSize());
+- map.remove("B", "BC");
++ map.removeMapping("B", "BC");
+ assertEquals(2, map.totalSize());
+ }
+
+@@ -204,7 +204,7 @@ public class TestMultiValueMap extends TestCase { + assertEquals(2, map.size());
+ map.remove("A");
+ assertEquals(2, map.size());
+- map.remove("B", "BC");
++ map.removeMapping("B", "BC");
+ assertEquals(2, map.size());
+ }
+
+@@ -227,7 +227,7 @@ public class TestMultiValueMap extends TestCase { + map.remove("A");
+ assertEquals(0, map.size("A"));
+ assertEquals(3, map.size("B"));
+- map.remove("B", "BC");
++ map.removeMapping("B", "BC");
+ assertEquals(0, map.size("A"));
+ assertEquals(2, map.size("B"));
+ }
+@@ -338,11 +338,11 @@ public class TestMultiValueMap extends TestCase { + map.put("A", "AA");
+ map.put("A", "AB");
+ map.put("A", "AC");
+- assertEquals(null, map.remove("C", "CA"));
+- assertEquals(null, map.remove("A", "AD"));
+- assertEquals("AC", map.remove("A", "AC"));
+- assertEquals("AB", map.remove("A", "AB"));
+- assertEquals("AA", map.remove("A", "AA"));
++ assertEquals(null, map.removeMapping("C", "CA"));
++ assertEquals(null, map.removeMapping("A", "AD"));
++ assertEquals("AC", map.removeMapping("A", "AC"));
++ assertEquals("AB", map.removeMapping("A", "AB"));
++ assertEquals("AA", map.removeMapping("A", "AA"));
+ assertEquals(new MultiValueMap(), map);
+ }
+
|