Eric Milles created GROOVY-10619:
------------------------------------
Summary: STC: fix support for unbounded wildcard references to
self-bounded type parameters
Key: GROOVY-10619
URL: https://issues.apache.org/jira/browse/GROOVY-10619
Project: Groovy
Issue Type: Bug
Components: Static Type Checker
Affects Versions: 4.0.2
Reporter: Eric Milles
Assignee: Eric Milles
{code:groovy}
@Grab('org.springframework.boot:spring-boot-starter-webflux:2.6.7')
import org.springframework.core.ParameterizedTypeReference
import org.springframework.http.MediaType
import org.springframework.web.reactive.function.client.WebClient
import java.time.Duration
@groovy.transform.CompileStatic
class WebFluxFluentApiBugTest {
private static final ParameterizedTypeReference<List<BigDecimal>> TYPE_TAG
= new ParameterizedTypeReference<List<BigDecimal>>() {}
private static final Duration MAX_DURATION = Duration.ofSeconds(8)
private final WebClient webClient
List<BigDecimal> flux() {
def response = webClient.get()
.uri('/something?id={id}', 'id')
.accept(MediaType.APPLICATION_JSON)
.retrieve()
.toEntity(TYPE_TAG)
.block(MAX_DURATION)
return response.getBody() ?: []
}
}
{code}
--
This message was sent by Atlassian Jira
(v8.20.7#820007)