[Git][java-team/gs-collections][master] 4 commits: initial java 21 support patch
Tony Mancill (@tmancill)
gitlab at salsa.debian.org
Fri Dec 15 05:14:26 GMT 2023
Tony Mancill pushed to branch master at Debian Java Maintainers / gs-collections
Commits:
ec40dd9f by Vladimir Petko at 2023-11-21T16:47:17+13:00
initial java 21 support patch
- - - - -
cda977cc by Vladimir Petko at 2023-11-21T16:52:11+13:00
update patch header
- - - - -
677c082b by Vladimir Petko at 2023-11-21T17:24:25+13:00
changelog
- - - - -
f8259eb9 by Tony Mancill at 2023-12-15T05:14:17+00:00
Merge branch 'master' into 'master'
Resolve Java 21 FTBFS
See merge request java-team/gs-collections!2
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/04-java-21-support.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+gs-collections (5.1.0-6) UNRELEASED; urgency=medium
+
+ * d/p/04-java-21-support.patch: cherry-pick upstream changes from
+ https://github.com/eclipse/eclipse-collections/tree/master to
+ resolve compilation errors (Closes: #1053024).
+
+ -- Vladimir Petko <vladimir.petko at canonical.com> Tue, 21 Nov 2023 16:53:01 +1300
+
gs-collections (5.1.0-5) unstable; urgency=medium
* Use --add-opens instead of --illegal-access=permit to build with OpenJDK 17
=====================================
debian/patches/04-java-21-support.patch
=====================================
@@ -0,0 +1,239 @@
+Description: Java 21 compatibility changes
+ Cherry-pick upstream changes from https://github.com/eclipse/eclipse-collections/tree/master
+ to make code compilable.
+Author: Vladimir Petko <vladimir.petko at canonical.com>
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1053024
+Forwarded: not-needed
+Last-Update: 2023-11-21
+--- a/collections-api/src/main/java/com/gs/collections/api/list/MutableList.java
++++ b/collections-api/src/main/java/com/gs/collections/api/list/MutableList.java
+@@ -159,4 +159,9 @@
+ * Mutates the current list by reversing its order and returns the current list as a result
+ */
+ MutableList<T> reverseThis();
++
++ @Override T getLast();
++
++ @Override T getFirst();
++
+ }
+--- a/collections-api/src/main/java/com/gs/collections/api/set/sorted/MutableSortedSet.java
++++ b/collections-api/src/main/java/com/gs/collections/api/set/sorted/MutableSortedSet.java
+@@ -151,4 +151,8 @@
+ MutableSortedSet<T> headSet(T toElement);
+
+ MutableSortedSet<T> tailSet(T fromElement);
++
++ @Override T getLast();
++
++ @Override T getFirst();
+ }
+--- a/collections/src/main/java/com/gs/collections/impl/lazy/parallel/AbstractParallelIterable.java
++++ b/collections/src/main/java/com/gs/collections/impl/lazy/parallel/AbstractParallelIterable.java
+@@ -535,7 +535,7 @@
+
+ public MutableSortedSet<T> toSortedSet(Comparator<? super T> comparator)
+ {
+- MutableSortedSet<T> result = TreeSortedSet.newSet(comparator).asSynchronized();
++ MutableSortedSet<T> result = TreeSortedSet.<T>newSet(comparator).asSynchronized();
+ this.forEach(CollectionAddProcedure.on(result));
+ return result;
+ }
+--- a/gs-collections-code-generator/src/main/resources/impl/map/immutable/immutablePrimitivePrimitiveHashMap.stg
++++ b/gs-collections-code-generator/src/main/resources/impl/map/immutable/immutablePrimitivePrimitiveHashMap.stg
+@@ -188,7 +188,8 @@
+
+ public \<V> ImmutableCollection\<V> collect(<name2>ToObjectFunction\<? extends V> function)
+ {
+- return this.delegate.collect(function).toImmutable();
++ com.gs.collections.api.collection.MutableCollection\<V> col = this.delegate.collect(function);
++ return col.toImmutable();
+ }
+
+ <(arithmeticMethods.(type2))()>
+--- a/gs-collections-code-generator/src/main/resources/impl/bag/immutable/immutablePrimitiveHashBag.stg
++++ b/gs-collections-code-generator/src/main/resources/impl/bag/immutable/immutablePrimitiveHashBag.stg
+@@ -141,7 +141,8 @@
+
+ public \<V> ImmutableBag\<V> collect(<name>ToObjectFunction\<? extends V> function)
+ {
+- return this.delegate.collect(function).toImmutable();
++ com.gs.collections.api.bag.MutableBag\<V> bag = this.delegate.collect(function);
++ return bag.toImmutable();
+ }
+
+ public Mutable<name>List toList()
+--- a/gs-collections-code-generator/src/main/resources/impl/map/immutable/immutablePrimitiveObjectHashMap.stg
++++ b/gs-collections-code-generator/src/main/resources/impl/map/immutable/immutablePrimitiveObjectHashMap.stg
+@@ -270,7 +270,8 @@
+
+ public \<VV> ImmutableCollection\<VV> collect(Function\<? super V, ? extends VV> function)
+ {
+- return this.delegate.collect(function).toImmutable();
++ com.gs.collections.api.collection.MutableCollection\<VV> col = this.delegate.collect(function);
++ return col.toImmutable();
+ }
+
+ <collectPrimitive("Boolean", "boolean")>
+@@ -291,7 +292,8 @@
+
+ public \<P, VV> ImmutableCollection\<VV> collectWith(Function2\<? super V, ? super P, ? extends VV> function, P parameter)
+ {
+- return this.delegate.collectWith(function, parameter).toImmutable();
++ com.gs.collections.api.collection.MutableCollection\<VV> col = this.delegate.collectWith(function, parameter);
++ return col.toImmutable();
+ }
+
+ public \<VV> RichIterable\<VV> collectIf(Predicate\<? super V> predicate, Function\<? super V, ? extends VV> function)
+--- a/collections/src/main/java/com/gs/collections/impl/set/strategy/mutable/UnifiedSetWithHashingStrategy.java
++++ b/collections/src/main/java/com/gs/collections/impl/set/strategy/mutable/UnifiedSetWithHashingStrategy.java
+@@ -284,7 +284,7 @@
+
+ public static <K> UnifiedSetWithHashingStrategy<K> newSetWith(HashingStrategy<? super K> hashingStrategy, K... elements)
+ {
+- return UnifiedSetWithHashingStrategy.newSet(hashingStrategy, elements.length).with(elements);
++ return UnifiedSetWithHashingStrategy.<K>newSet(hashingStrategy, elements.length).with(elements);
+ }
+
+ public HashingStrategy<? super K> hashingStrategy()
+--- a/gs-collections-code-generator/src/main/resources/impl/map/immutable/immutableObjectPrimitiveHashMap.stg
++++ b/gs-collections-code-generator/src/main/resources/impl/map/immutable/immutableObjectPrimitiveHashMap.stg
+@@ -114,7 +114,8 @@
+
+ public \<V> ImmutableCollection\<V> collect(<name>ToObjectFunction\<? extends V> function)
+ {
+- return this.delegate.collect(function).toImmutable();
++ com.gs.collections.api.collection.MutableCollection\<V> col = this.delegate.collect(function);
++ return col.toImmutable();
+ }
+
+ <(arithmeticMethods.(type))()>
+--- a/collections/src/main/java/com/gs/collections/impl/stack/immutable/ImmutableArrayStack.java
++++ b/collections/src/main/java/com/gs/collections/impl/stack/immutable/ImmutableArrayStack.java
+@@ -139,7 +139,7 @@
+
+ public static <T> ImmutableArrayStack<T> newStackFromTopToBottom(Iterable<? extends T> items)
+ {
+- return new ImmutableArrayStack<T>(FastList.newList(items).reverseThis());
++ return new ImmutableArrayStack<T>(FastList.<T>newList(items).reverseThis());
+ }
+
+ public static <T> ImmutableArrayStack<T> newStackFromTopToBottom(T... items)
+--- a/collections/src/main/java/com/gs/collections/impl/block/factory/Procedures.java
++++ b/collections/src/main/java/com/gs/collections/impl/block/factory/Procedures.java
+@@ -91,7 +91,8 @@
+ Predicate<? super T> predicate,
+ Procedure<? super T> procedure)
+ {
+- return Procedures.caseDefault(defaultProcedure).addCase(predicate, procedure);
++ CaseProcedure<T> p = Procedures.caseDefault(defaultProcedure);
++ return p.addCase(predicate, procedure);
+ }
+
+ public static <T> Procedure<T> synchronizedEach(Procedure<T> procedure)
+--- a/collections/src/main/java/com/gs/collections/impl/stack/mutable/ArrayStack.java
++++ b/collections/src/main/java/com/gs/collections/impl/stack/mutable/ArrayStack.java
+@@ -156,7 +156,7 @@
+ public static <T> ArrayStack<T> newStackFromTopToBottom(Iterable<? extends T> items)
+ {
+ ArrayStack<T> stack = newStack();
+- stack.delegate = FastList.newList(items).reverseThis();
++ stack.delegate = FastList.<T>newList(items).reverseThis();
+ return stack;
+ }
+
+--- a/collections/src/main/java/com/gs/collections/impl/block/factory/Functions.java
++++ b/collections/src/main/java/com/gs/collections/impl/block/factory/Functions.java
+@@ -416,7 +416,7 @@
+ Predicate<? super T> predicate,
+ Function<? super T, ? extends V> function)
+ {
+- CaseFunction<T, V> caseFunction = Functions.caseDefault(defaultFunction);
++ CaseFunction<T, V> caseFunction = Functions.<T,V>caseDefault(defaultFunction);
+ return caseFunction.addCase(predicate, function);
+ }
+
+--- a/collections/src/main/java/com/gs/collections/impl/bag/immutable/ImmutableSingletonBag.java
++++ b/collections/src/main/java/com/gs/collections/impl/bag/immutable/ImmutableSingletonBag.java
+@@ -138,7 +138,8 @@
+
+ public ImmutableBag<T> newWithAll(Iterable<? extends T> elements)
+ {
+- return HashBag.newBag(elements).with(this.value).toImmutable();
++ com.gs.collections.api.bag.MutableBag<T> bag = HashBag.<T>newBag(elements);
++ return bag.with(this.value).toImmutable();
+ }
+
+ public ImmutableBag<T> newWithoutAll(Iterable<? extends T> elements)
+--- a/collections/src/main/java/com/gs/collections/impl/bag/immutable/ImmutableHashBag.java
++++ b/collections/src/main/java/com/gs/collections/impl/bag/immutable/ImmutableHashBag.java
+@@ -41,6 +41,7 @@
+ import com.gs.collections.api.map.MutableMap;
+ import com.gs.collections.api.multimap.MutableMultimap;
+ import com.gs.collections.api.multimap.bag.ImmutableBagMultimap;
++import com.gs.collections.api.multimap.bag.MutableBagMultimap;
+ import com.gs.collections.api.partition.bag.PartitionImmutableBag;
+ import com.gs.collections.api.set.ImmutableSet;
+ import com.gs.collections.api.set.MutableSet;
+@@ -126,7 +127,8 @@
+
+ public <V> ImmutableBagMultimap<V, T> groupBy(Function<? super T, ? extends V> function)
+ {
+- return this.delegate.groupBy(function).toImmutable();
++ MutableBagMultimap<V,T> bag = this.delegate.groupBy(function);
++ return bag.toImmutable();
+ }
+
+ @Override
+@@ -150,7 +152,8 @@
+
+ public <V> ImmutableMap<V, T> groupByUniqueKey(Function<? super T, ? extends V> function)
+ {
+- return this.delegate.groupByUniqueKey(function).toImmutable();
++ MutableMap<V,T> map = this.delegate.groupByUniqueKey(function);
++ return map.toImmutable();
+ }
+
+ @Override
+@@ -288,13 +291,15 @@
+
+ public <V> ImmutableBag<V> collect(Function<? super T, ? extends V> function)
+ {
+- return this.delegate.collect(function).toImmutable();
++ MutableBag<V> bag = this.delegate.collect(function);
++ return bag.toImmutable();
+ }
+
+ public <V> ImmutableBag<V> collectIf(
+ Predicate<? super T> predicate, Function<? super T, ? extends V> function)
+ {
+- return this.delegate.collectIf(predicate, function).toImmutable();
++ MutableBag<V> bag = this.delegate.collectIf(predicate, function);
++ return bag.toImmutable();
+ }
+
+ public <V> ImmutableBag<V> flatCollect(Function<? super T, ? extends Iterable<V>> function)
+--- a/collections/src/main/java/com/gs/collections/impl/bag/immutable/ImmutableEmptyBag.java
++++ b/collections/src/main/java/com/gs/collections/impl/bag/immutable/ImmutableEmptyBag.java
+@@ -240,7 +240,8 @@
+
+ public ImmutableBag<T> newWithAll(Iterable<? extends T> elements)
+ {
+- return HashBag.newBag(elements).toImmutable();
++ MutableBag<T> bag = HashBag.newBag(elements);
++ return bag.toImmutable();
+ }
+
+ public ImmutableBag<T> newWithoutAll(Iterable<? extends T> elements)
+--- a/collections-testutils/src/main/java/com/gs/collections/impl/test/Verify.java
++++ b/collections-testutils/src/main/java/com/gs/collections/impl/test/Verify.java
+@@ -1468,7 +1468,8 @@
+ {
+ try
+ {
+- Assert.assertTrue(message, Predicates.anySatisfy(predicate).accept(iterable));
++ Predicates<Iterable<T>> pred = Predicates.anySatisfy(predicate);
++ Assert.assertTrue(message, pred.accept(iterable));
+ }
+ catch (AssertionError e)
+ {
=====================================
debian/patches/series
=====================================
@@ -1 +1,2 @@
03-bundle-dependencies.patch
+04-java-21-support.patch
View it on GitLab: https://salsa.debian.org/java-team/gs-collections/-/compare/b350fefd2ea4bfb959a5a88c23ff382db7a8b0c4...f8259eb9c2c90e4532933ff9d58ee58eed2d61c9
--
View it on GitLab: https://salsa.debian.org/java-team/gs-collections/-/compare/b350fefd2ea4bfb959a5a88c23ff382db7a8b0c4...f8259eb9c2c90e4532933ff9d58ee58eed2d61c9
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20231215/b1a12e31/attachment.htm>
More information about the pkg-java-commits
mailing list