[
https://issues.apache.org/jira/browse/JCLOUDS-1333?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17144475#comment-17144475
]
ASF subversion and git services commented on JCLOUDS-1333:
----------------------------------------------------------
Commit 62767a14610fc1c97c440dbd5ee0f02b276a1069 in jclouds's branch
refs/heads/master from Andrew Gaul
[ https://gitbox.apache.org/repos/asf?p=jclouds.git;h=62767a1 ]
JCLOUDS-1333: JCLOUDS-1334: JCLOUDS-1470: Require Java 8 and Guava 22
This allows compatibility with Guava 29. Also unwind some older
workarounds.
> Cannot compile jclouds with Guava 21+
> -------------------------------------
>
> Key: JCLOUDS-1333
> URL: https://issues.apache.org/jira/browse/JCLOUDS-1333
> Project: jclouds
> Issue Type: Improvement
> Components: jclouds-core
> Affects Versions: 2.1.0
> Reporter: Andrew Gaul
> Priority: Major
> Labels: guava
> Time Spent: 3h 20m
> Remaining Estimate: 0h
>
> jclouds has compatibility with Guava 18-22 but we cannot compile using 21+
> due to some kind of Guava vs Java 8 Function class type error:
> {noformat}
> /home/gaul/work/jclouds/core/src/main/java/org/jclouds/rest/internal/TransformerForRequest.java:102:
> error: method compose in interface java.util.function.Function<T,R> cannot
> be applied to given types;
> transformer = compose(Function.class.cast(wrappingTransformer),
> transformer);
> ^
> required: java.util.function.Function<? super V,? extends HttpRequest>
> found:
> com.google.common.base.Function,com.google.common.base.Function<HttpResponse,CAP#1>
> reason: cannot infer type-variable(s) V
> (actual and formal argument lists differ in length)
> where V,T,R are type-variables:
> V extends Object declared in method
> <V>compose(java.util.function.Function<? super V,? extends T>)
> T extends Object declared in interface java.util.function.Function
> R extends Object declared in interface java.util.function.Function
> where CAP#1 is a fresh type-variable:
> CAP#1 extends Object from capture of ?
> /home/gaul/work/jclouds/core/src/main/java/org/jclouds/rest/internal/TransformerForRequest.java:189:
> error: method compose in interface java.util.function.Function<T,R> cannot
> be applied to given types;
> transformer = compose(new OnlyElementOrNull(), transformer);
> ^
> required: java.util.function.Function<? super V,? extends HttpRequest>
> found:
> OnlyElementOrNull,com.google.common.base.Function<HttpResponse,CAP#1>
> reason: cannot infer type-variable(s) V
> (actual and formal argument lists differ in length)
> where V,T,R are type-variables:
> V extends Object declared in method
> <V>compose(java.util.function.Function<? super V,? extends T>)
> T extends Object declared in interface java.util.function.Function
> R extends Object declared in interface java.util.function.Function
> where CAP#1 is a fresh type-variable:
> CAP#1 extends Object from capture of ?
> {noformat}
> This does not affect applications from using Guava 21-22 but does impact our
> compatibility testing. Note that you need to set {{maven.compile.source}} to
> 1.8 to test Guava 21+.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)