Skip to content

Revise type-level nullability in ResponseExtractor #36319

@sbrannen

Description

@sbrannen

Overview

The nullability is currently defined as follows.

public interface ResponseExtractor<T> {

	@Nullable T extractData(ClientHttpResponse response) throws IOException;
}

After discussions in #36312, we are considering changing that to the following in Spring Framework 7.1 in order to improve nullability inference.

public interface ResponseExtractor<T extends @Nullable Object> {

	T extractData(ClientHttpResponse response) throws IOException;
}

Related Issues

Metadata

Metadata

Assignees

No one assigned

    Labels

    in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions