Skip to content

close perhaps shouldn’t throw #287

Closed

Description

@oliviercailloux

DBusConnection#close() says: “Same as disconnect”. DBusConnection#disconnect() does not throw. So, close should not throw. Unless I am missing something?

Can you remove the declaration of this exception? This would permit not having to deal with it when closing the connection.

Activity

  1. hypfvieh commented on Jul 4, 2025

    @hypfvieh
    Owner

    I added this to the list of planned changes for next major version.
    I cannot remove it in 5.x because this would break every existing code with try..catch exception handling as close() would no longer throw anything

  2. oliviercailloux commented on Jul 4, 2025

    @oliviercailloux
    Author

    Perhaps it would be useful to document that this exception will be removed in a future version (one positive effect is that others will not be tempted to report another issue about this)?

  3. hypfvieh commented on Feb 19, 2026

    @hypfvieh
    Owner

    Part of dbus-java 6.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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