Re-check shop.display-items directly before the AFTER_ON_ENABLE virtual display manager self-test.
Capture VirtualDisplayItemManager once and reuse the same reference for the null check and packet test.
Why
PR #2 only checked the cached isDisplayEnabled() state. Servers configured with shop.display-items: false could still reach the manager assertion and log:
VirtualDisplayItemManager is null, this shouldn't happen...
The manager is intentionally absent when display items are disabled, so the self-test must honor the source configuration as well as the cached flag.
Impact
Disabled display configurations no longer emit the false-positive warning. Enabled virtual display configurations retain the existing null warning and packet self-test.
Validation
Compared agent/harden-disabled-virtual-display-check against main.
Branch is one commit ahead and not behind.
Exactly one file changed: 5 additions, 4 deletions.
A local Maven build was not available because the GitHub CLI is not installed and outbound Git cloning is unavailable in this environment.
This change is based solely on the existing GPL-era QuickShop-OG source. No post-license-change AGPL code was referenced or used.
## What changed
- Re-check `shop.display-items` directly before the `AFTER_ON_ENABLE` virtual display manager self-test.
- Capture `VirtualDisplayItemManager` once and reuse the same reference for the null check and packet test.
## Why
PR #2 only checked the cached `isDisplayEnabled()` state. Servers configured with `shop.display-items: false` could still reach the manager assertion and log:
`VirtualDisplayItemManager is null, this shouldn't happen...`
The manager is intentionally absent when display items are disabled, so the self-test must honor the source configuration as well as the cached flag.
## Impact
Disabled display configurations no longer emit the false-positive warning. Enabled virtual display configurations retain the existing null warning and packet self-test.
## Validation
- Compared `agent/harden-disabled-virtual-display-check` against `main`.
- Branch is one commit ahead and not behind.
- Exactly one file changed: 5 additions, 4 deletions.
- A local Maven build was not available because the GitHub CLI is not installed and outbound Git cloning is unavailable in this environment.
This change is based solely on the existing GPL-era QuickShop-OG source. No post-license-change AGPL code was referenced or used.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
What changed
shop.display-itemsdirectly before theAFTER_ON_ENABLEvirtual display manager self-test.VirtualDisplayItemManageronce and reuse the same reference for the null check and packet test.Why
PR #2 only checked the cached
isDisplayEnabled()state. Servers configured withshop.display-items: falsecould still reach the manager assertion and log:VirtualDisplayItemManager is null, this shouldn't happen...The manager is intentionally absent when display items are disabled, so the self-test must honor the source configuration as well as the cached flag.
Impact
Disabled display configurations no longer emit the false-positive warning. Enabled virtual display configurations retain the existing null warning and packet self-test.
Validation
agent/harden-disabled-virtual-display-checkagainstmain.This change is based solely on the existing GPL-era QuickShop-OG source. No post-license-change AGPL code was referenced or used.