Error:(65, 52) java: incompatible types: inference variable U has incompatible bounds equality constraints: akka.http.javadsl.model.HttpResponse lower bounds: com.myactors.ChatActor.ChatMessage
The following line compiles shows error :
CompletionStage<HttpResponse> httpResponse =
postChat(url,
context().system(), chatData)
.thenApplyAsync(httpResponse -> new ChatActor.ChatMessage(httpResponse,"1234"));
public static class ChatMessage{
HttpResponse httpResponse;
String name;
public ChatMessage( HttpResponse httpResponse, String name) {
this.httpResponse = httpResponse;
this.name = name;
}
public HttpResponse getHttpResponse() {
return httpResponse;
}
public String getname() {
return name;
}
}
Here is HttpResponse is of Akka Http.
I dont know what it is saying. What should the way to resolve it?