Skip to content

Remove the never-public org.metricshub.winrm.backend property (#121) - #127

Merged
bertysentry merged 2 commits into
MetricsHub:mainfrom
anuragpaul602-netizen:121-remove-backend-property
Jul 25, 2026
Merged

Remove the never-public org.metricshub.winrm.backend property (#121)#127
bertysentry merged 2 commits into
MetricsHub:mainfrom
anuragpaul602-netizen:121-remove-backend-property

Conversation

@anuragpaul602-netizen

Copy link
Copy Markdown
Contributor

Closes #121.

The property was a transitional guard around the CXF removal during 2.0.0 development — it defaulted to light and rejected cxf. No public release ever exposed it, so no user can have it set and the branches it guards are dead.

Code

  • WinRMExecutorFactory — removed the public BACKEND_PROPERTY constant and the LIGHT / CXF constants; createInstance(...) now delegates straight to LightWinRMService.createInstance(...). The class and method Javadoc no longer mention the property, and the java.util.Locale import went with the toLowerCase call.
  • WinRMExecutorFactoryTest — removed cxfBackendRejectedWithRemovalMessage, unsupportedBackendValueRejected, the @AfterEach that cleared the property, and every System.setProperty(...) call. With the property gone, lightBackendSelectedForHttpNtlm / defaultBackendIsLight and lightBackendAcceptsHttps / defaultBackendAcceptsHttps became identical pairs, so each pair is merged into a single test (createsLightExecutorOverHttp, createsLightExecutorOverHttps), keeping the stronger assertions. The capability guards — Kerberos-only over HTTP rejected, mixed Kerberos/NTLM fallback, Kerberos over HTTPS, closed-executor rejection — are untouched. 10 tests → 6.

Documentation

The issue notes the doc references were already removed, but three were still present, so they are removed here as well:

  • src/site/markdown/index.md — this one sits under src/, which the acceptance criterion ("no reference anywhere in src/") covers.
  • README.md — the upgrade note dropped from "Two consequences" to one.
  • CHANGELOG.md — the bullet told readers to unset a property that will not exist in the release the entry describes.

Verification

  • grep -rn "winrm.backend" src → nothing; repo-wide grep for winrm.backend and BACKEND_PROPERTY → nothing.
  • createInstance(...) still returns a LightWinRMService, asserted by assertInstanceOf in the surviving tests.
  • Checkstyle: 0. PMD: unchanged from main (91, none in the touched files — those are Fix the 89 PMD violations reported by the Maven site #122's business, and the two PRs do not overlap).
  • mvn verify: 78 tests, all passing except WinRmCliTest.decodesCommandOutputUsingTheRemoteWindowsCodePage and WinRMWqlExecutorTest.testExecute, which fail identically on unmodified main here — Mockito's inline mock maker cannot mock under JDK 25. Unrelated to this change.

Branched from main and independent of #122, so the two can merge in either order.

anuragpaul602-netizen and others added 2 commits July 24, 2026 23:19
…sHub#121)

The property was a transitional guard around the CXF removal during 2.0.0
development: it defaulted to `light` and rejected `cxf`. No public release
ever exposed it, so nobody can have it set and the branches it guards are
dead.

- WinRMExecutorFactory: drop BACKEND_PROPERTY and the LIGHT/CXF constants,
  and let createInstance delegate straight to LightWinRMService.
- WinRMExecutorFactoryTest: drop the cxf-rejection and unknown-value tests,
  the @AfterEach that cleared the property, and the setProperty calls. The
  `light` and default variants of the HTTP/HTTPS tests became identical, so
  they are merged into one test each; the capability guards (Kerberos over
  HTTP/HTTPS, closed-executor rejection) are untouched.

The issue lists the documentation as already cleaned up, but three
references were still there and are removed here too: README.md,
CHANGELOG.md, and src/site/markdown/index.md — the last one inside src/,
which the acceptance criteria cover.
…operty

# Conflicts:
#	README.md
#	src/site/markdown/index.md
@bertysentry
bertysentry merged commit 1b453d0 into MetricsHub:main Jul 25, 2026
1 of 2 checks passed
@anuragpaul602-netizen

Copy link
Copy Markdown
Contributor Author

I want to work further in this project. Can you add me as a contributor?

@bertysentry

Copy link
Copy Markdown
Contributor

Thanks! Your two merged PRs already make you a contributor 😊 and you’re welcome to continue contributing through fork-based pull requests. We don’t grant repository write access based on initial contributions. For now, please agree on an issue with us before starting, keep one focused PR active at a time, disclose substantial AI assistance, and be prepared to explain and maintain every change. We can reconsider additional permissions after a sustained track record.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the never-public org.metricshub.winrm.backend system property from the code

2 participants