Skip to content

Close throws Exception #108

Closed
Closed
@oliviercailloux

Description

@oliviercailloux

AutoCloseable::close documentation mentions: “While this interface method is declared to throw Exception, implementers are strongly encouraged to declare concrete implementations of the close method to throw more specific exceptions, or to throw no exception at all if the close operation cannot fail.”

Would you consider modifying the declaration of close() in Jsonb::close (currently not declared thus inheriting from AutoCloseable) as throwing JsonbException?

Relatedly, the documentation of Jsonb mentions: “Calling Closable.close() method will cleanup all CDI managed components (such as adapters with CDI dependencies) created during interaction with Jsonb.” Can I conclude that, if using Jsonb in Java SE (and no CDI), it is safe to not close the jsonb instances I create? If so, would you consider documenting that fact?

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