Remove the never-public org.metricshub.winrm.backend property (#121) - #127
Merged
bertysentry merged 2 commits intoJul 25, 2026
Merged
Conversation
…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
Contributor
Author
|
I want to work further in this project. Can you add me as a contributor? |
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #121.
The property was a transitional guard around the CXF removal during 2.0.0 development — it defaulted to
lightand rejectedcxf. No public release ever exposed it, so no user can have it set and the branches it guards are dead.Code
WinRMExecutorFactory— removed the publicBACKEND_PROPERTYconstant and theLIGHT/CXFconstants;createInstance(...)now delegates straight toLightWinRMService.createInstance(...). The class and method Javadoc no longer mention the property, and thejava.util.Localeimport went with thetoLowerCasecall.WinRMExecutorFactoryTest— removedcxfBackendRejectedWithRemovalMessage,unsupportedBackendValueRejected, the@AfterEachthat cleared the property, and everySystem.setProperty(...)call. With the property gone,lightBackendSelectedForHttpNtlm/defaultBackendIsLightandlightBackendAcceptsHttps/defaultBackendAcceptsHttpsbecame 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 undersrc/, which the acceptance criterion ("no reference anywhere insrc/") 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 forwinrm.backendandBACKEND_PROPERTY→ nothing.createInstance(...)still returns aLightWinRMService, asserted byassertInstanceOfin the surviving tests.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 exceptWinRmCliTest.decodesCommandOutputUsingTheRemoteWindowsCodePageandWinRMWqlExecutorTest.testExecute, which fail identically on unmodifiedmainhere — Mockito's inline mock maker cannot mock under JDK 25. Unrelated to this change.Branched from
mainand independent of #122, so the two can merge in either order.