← Back to Pull requests

Replace OSXAdapter with java.awt.Desktop handlers #557

Closed
unknown closed this pull request without merging on Nov 17, 2026 02:16 UTC
View on GitHub
unknown unknown commented on Nov 03, 2026 20:21 UTC
Author

Summary

OSXAdapter is Apple's sample adapter, under Apple's own license header (relates to https://github.com/OpenIntegrationEngine/engine/issues/472), that installs the macOS About and Quit handlers by reflection against com.apple.eawt.Application. Its pre-Java-9 path implements com.apple.eawt.ApplicationListener, which JEP 272 removed; its Java 9+ path only works because the launcher passes --add-opens java.desktop/com.apple.eawt. Both end up at the same java.awt.desktop handlers that java.awt.Desktop has exposed publicly since Java 9, so the reflection, the add-opens, and the Apple-licensed file can all go. #544 drew attention to the class while converting its stderr prints.

  • Deletes OSXAdapter.java and registers the two handlers with java.awt.Desktop.setAboutHandler / setQuitHandler, guarded by isSupported instead of IS_OS_MAC. Linux and Windows report both actions unsupported, so nothing changes there. The quit handler keeps the old contract: Frame.logout(true) doesn't call System.exit, so it calls performQuit() when quitMac() returns true and cancelQuit() otherwise.

  • Simplifies BareBonesBrowserLaunch.openURL to call Desktop.browse directly and drops its com.apple.eio.FileManager and rundll32 fallbacks, which can't be reached on Java 17 since Desktop is always supported on macOS and Windows. The Unix browser search stays for Linux desktops without the GNOME libraries Desktop needs.

  • Removes the --add-opens for com.apple.eawt and com.apple.eio from server/mirth-client.jnlp, WebStartServletTest, and the devClient Gradle task. Nothing else referenced those packages.
  • Testing

    I verified that the browser launching still works from non-GNOME linux.

    This needs a manual check on macOS, which I can't do

  • The application menu's About item should open the About dialog

  • Cmd-Q while logged in should prompt for logout and exit only after it succeeds

  • Cmd-Q on the login window should exit.
  • That is the behavior the old Java 9+ path provided, so no change is expected.

    Claude checked:

  • ./gradlew clean build: all 797 tests pass.

  • No remaining reference to com.apple anywhere in the repository.
  • ---
    🤖 Drafted with Claude Code

    Diff: 284 lines (+213 / -71) across 3 files Reviewer: pacmano1 Review duration: 19075m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.40 · 284 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.338
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #557"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.7% (MEDIUM) · Higher = larger blast radius
    39.7%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.7% · Safe to merge
    15.7%