Skip to content

DefaultDockingStrategy.getSibling throws NPE for a dockable that is not docked #31

Closed

Description

@danilovesky

Javadoc for getSibling(Dockable) and getSibling(Dockable, String) says they return null when the dockable is not docked. Instead they throw a NullPointerException in findRegion (DefaultDockingStrategy.java:242)

This happens because DockingManager.getDockingPort returns null and thenport.getDockedComponent() is called on it.

To reproduce, call DefaultDockingStrategy.getSibling(new View("id", "title")) for a view that was never docked.

Activity

  1. danilovesky commented on Nov 23, 2026

    @danilovesky
    ContributorAuthor

    Fixed by #36 (commit 1d79760): findRegion() now returns null when the dockable has no docking port, so both getSibling() overloads return null as documented. Covered by SiblingDockingTest.testNoSiblingForUndockedDockable.

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