-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Closed
Labels
documentationIssues that require updates to our documentationIssues that require updates to our documentation
Description
The example code given here for ExampleReactor does not compile.
The code in question:
public interface GitHubReactor {
@RequestLine("GET /repos/{owner}/{repo}/contributors")
Flux<Contributor> contributors(@Param("owner") String owner, @Param("repo") String repo);
class Contributor {
String login;
public Contributor(String login) {
this.login = login;
}
}
}
public class ExampleReactor {
public static void main(String args[]) {
GitHubReactor gitHub = ReactorFeign.builder()
.target(GitHubReactor.class, "https://api.github.com");
List<Contributor> contributors = gitHub.contributors("OpenFeign", "feign")
.map(Contributor::new)
.collect(Collectors.toList())
.block();
}
}
Gives the error:
Error:(31, 17) java: method map in class reactor.core.publisher.Flux<T> cannot be applied to given types;
required: java.util.function.Function<? super com.example.spring.demo.GitHubReactor.Contributor,? extends V>
found: GitHubReac[...]::new
reason: cannot infer type-variable(s) V
(argument mismatch; invalid constructor reference
incompatible types: com.example.spring.demo.GitHubReactor.Contributor cannot be converted to java.lang.String)
Metadata
Metadata
Assignees
Labels
documentationIssues that require updates to our documentationIssues that require updates to our documentation