Skip to content

Add JVM lazy clipboard verification tests for platform behavior documentation #3927

@guiyanakuang

Description

@guiyanakuang

JVM's Transferable.getTransferData() is not lazy on macOS and Windows — setContents() immediately calls getTransferData() to serialize data into the system clipboard. Only Linux/X11 supports true lazy evaluation.

Add tests that prove this platform behavior using a custom Transferable that tracks getTransferData() invocations. Tests are organized by platform using JUnit 5 @Nested + @EnabledOnOs, and safely skip in headless CI environments via @EnabledIf.

  • macOS: 4 tests asserting eager getTransferData during setContents
  • Windows: 4 tests asserting eager behavior (mirrors macOS)
  • Linux: 4 tests asserting lazy behavior (deferred until getData)

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