Skip to content
This repository was archived by the owner on Feb 8, 2023. It is now read-only.
This repository was archived by the owner on Feb 8, 2023. It is now read-only.

JSON get does not handle missing cookie #16

@literakl

Description

@literakl

public synchronized String get(String name) returns null when cookie is not present. The JSON variant does not checks returned value and passes null to object mapper where NPE is thrown.

public T get(String name, Class dataType) throws CookieParseException {
String value = this.get(name);
try {
return this.mapper.readValue(value, dataType);
} catch (IOException var5) {
throw new CookieParseException(var5);
}
}

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