[Git][java-team/gradle][master] Fixed the type inference errors when building with source/target level 8 (Closes: #1052758)

Emmanuel Bourg (@ebourg) gitlab at salsa.debian.org
Wed Sep 27 07:13:13 BST 2023



Emmanuel Bourg pushed to branch master at Debian Java Maintainers / gradle


Commits:
eec89b31 by Emmanuel Bourg at 2023-09-27T08:05:07+02:00
Fixed the type inference errors when building with source/target level 8 (Closes: #1052758)

- - - - -


3 changed files:

- debian/changelog
- debian/patches/series
- + debian/patches/type-inference-fix.patch


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+gradle (4.4.1-20) unstable; urgency=medium
+
+  * Team upload.
+  * Fixed the type inference errors when building with source/target level 8
+    (Closes: #1052758)
+
+ -- Emmanuel Bourg <ebourg at apache.org>  Wed, 27 Sep 2023 08:04:43 +0200
+
 gradle (4.4.1-19) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/series
=====================================
@@ -40,3 +40,4 @@ permit-illegal-access.patch
 java17-compatibility.patch
 auto-adjust-language-level.patch
 CVE-2019-16370.patch
+type-inference-fix.patch


=====================================
debian/patches/type-inference-fix.patch
=====================================
@@ -0,0 +1,45 @@
+Description: Fixes the type inference errors when building with the source/target level set to Java 8
+Author: Emmanuel Bourg <ebourg at apache.org>
+Forwarded: not-needed
+--- a/subprojects/base-services/src/main/java/org/gradle/internal/Actions.java
++++ b/subprojects/base-services/src/main/java/org/gradle/internal/Actions.java
+@@ -64,7 +64,7 @@
+      * @return The composite action.
+      */
+     public static <T> Action<T> composite(Action<? super T>... actions) {
+-        return composite(Arrays.asList(actions));
++        return composite((java.util.List) Arrays.asList(actions));
+     }
+ 
+     private static class CompositeAction<T> implements Action<T> {
+--- a/subprojects/base-services-groovy/src/main/java/org/gradle/api/specs/Specs.java
++++ b/subprojects/base-services-groovy/src/main/java/org/gradle/api/specs/Specs.java
+@@ -63,7 +63,7 @@
+         if (specs.length == 1) {
+             return Cast.uncheckedCast(specs[0]);
+         }
+-        return doIntersect(Arrays.asList(specs));
++        return doIntersect((List) Arrays.asList(specs));
+     }
+ 
+     /**
+@@ -105,7 +105,7 @@
+         if (specs.length == 1) {
+             return Cast.uncheckedCast(specs[0]);
+         }
+-        return doUnion(Arrays.asList(specs));
++        return doUnion((List) Arrays.asList(specs));
+     }
+ 
+     /**
+--- a/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/DefaultGlobalDependencyResolutionRules.java
++++ b/subprojects/dependency-management/src/main/java/org/gradle/api/internal/artifacts/DefaultGlobalDependencyResolutionRules.java
+@@ -60,7 +60,7 @@
+ 
+         @Override
+         public Action<DependencySubstitution> getRuleAction() {
+-            return Actions.composite(CollectionUtils.collect(ruleProviders, new Transformer<Action<? super DependencySubstitution>, DependencySubstitutionRules>() {
++            return Actions.composite((java.util.Collection) CollectionUtils.collect(ruleProviders, new Transformer<Action<? super DependencySubstitution>, DependencySubstitutionRules>() {
+                 @Override
+                 public Action<? super DependencySubstitution> transform(DependencySubstitutionRules rule) {
+                     return rule.getRuleAction();



View it on GitLab: https://salsa.debian.org/java-team/gradle/-/commit/eec89b31a252685e65f19edcbbdad190ea7e4031

-- 
View it on GitLab: https://salsa.debian.org/java-team/gradle/-/commit/eec89b31a252685e65f19edcbbdad190ea7e4031
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/20230927/d8620ce4/attachment.htm>


More information about the pkg-java-commits mailing list