Skip to content

fix(DesktopContentExplorer): PSDesktopExplorerWindow this-escape (#2444) - #2586

Merged
natechadwick merged 1 commit into
mainfrom
fix/issue-2444-desktop-explorer-this-escape
Aug 9, 2026
Merged

natechadwick merged 1 commit into
mainfrom
fix/issue-2444-desktop-explorer-this-escape

Conversation

@natechadwick-intsof

Copy link
Copy Markdown
Collaborator

Summary

Eliminates javac this-escape on PSDesktopExplorerWindow (residual of #2384 under parent #2045 / #2200).

Changes

  • PSDesktopExplorerStateProvider is now a static nested class (does not capture outer this).
  • PSJavaBridge is lazy-init via getBridge() (double-checked locking) so constructors/field initializers do not publish this.
  • setJavaBridge() installs the bridge through getBridge().
  • Non-serializable collaborators (bridge, myStateProvider) marked transient.
  • Unit tests for static provider, post-ctor null bridge, stable lazy bridge, and transient fields.

No product behavior change — bridge is still created before install on the page window.

Fixes #2444
Parent trackers: #2045, #2200
Operator: Grok: night-issue-prs (model grok-4.5)

Test plan

  • cd modules/DesktopContentExplorer && ../../mvnw.cmd clean install — BUILD SUCCESS
  • Tests run: 86, Failures: 0, Errors: 0, Skipped: 0 (includes 6 new PSDesktopExplorerWindowTest)
  • No new compiler warnings attributable to this change
  • Erlang-style self-review: no path I/O; change-class companions (unit tests); lazy init preserves install-time bridge identity

Gates evidence

Gate Result
Module standalone clean install BUILD SUCCESS
Unit tests 86 / 0 fail
this-escape mitigation static nested + lazy bridge
Human QA Not required (pure tech-debt, no UI/install behavior change)

Co-Authored by Grok Build using grok-4.5 with agent main.

…scape (#2444)

Make PSDesktopExplorerStateProvider a static nested class and lazy-init
PSJavaBridge via getBridge() so constructors do not publish this. Mark
non-serializable collaborators transient. No product behavior change.

Fixes #2444
Parent: #2045 / #2200

> Co-Authored by Grok Build using grok-4.5 with agent main.
@kilo-code-bot

kilo-code-bot Bot commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (2 files)
  • modules/DesktopContentExplorer/src/main/java/com/percussion/cx/javafx/PSDesktopExplorerWindow.java
  • modules/DesktopContentExplorer/src/test/java/com/percussion/cx/javafx/PSDesktopExplorerWindowTest.java

Reviewed by step-3.7-flash · Input: 66.2K · Output: 13.3K · Cached: 1.1M

Review guidance: REVIEW.md from base branch main

@natechadwick
natechadwick merged commit 5fff947 into main Aug 9, 2026
6 checks passed
@natechadwick
natechadwick deleted the fix/issue-2444-desktop-explorer-this-escape branch August 9, 2026 09:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

model:grok-4.5 Grok 4.5 model operator:grok Changes authored by Grok operator:night-issue-prs night-issue-prs workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[8.2] perc-content-explorer: PSDesktopExplorerWindow this-escape residual (#2045)

2 participants