Skip to content

Response.Builder API does not enforce non null requirement for headers #560

@cberg-zalando

Description

@cberg-zalando

In one of our projects I just updated from feign 8.x -> 9.x and noticed that the static create methods in the Response class are now deprecated and instead the builder pattern should be used.

As we don't need to specify headers, I omitted settings those and then experienced a NullPointerException when the caseInsensitveCopyOf method was called.

I'd say, either initialize its property with a Collections.emptyMap in the builder or check for headers being not null when calling the build method.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions