Repository navigation
Keep every element of WQL array properties (#189) - #193
Conversation
WS-Management returns a WMI array property as sibling elements sharing one name; each one used to overwrite the previous, so only the last element survived (IPAddress, IPSubnet, DefaultIPGateway, Capabilities...). The elements are now joined with "|" by default; the new WinRMClient.Builder.arraySeparator(String) changes the separator. The WqlRow Javadoc now matches the code: a WMI NULL is an empty string and null means "no such property". Documented in wql.md, the builder options table and the changelog. Closes #189 Co-Authored-By: Claude Fable 5.1 <[email protected]>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 99f8e22aa1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…s linearly Restore the createInstance overload without arraySeparator as a delegating compatibility overload, and build joined array values with StringBuilders so a large array (SMBIOS raw tables) is appended in linear time. Co-Authored-By: Claude Fable 5.1 <[email protected]>
|
@codex please review again |
|
Codex Review: Didn't find any major issues. You're on a roll. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #189.
Problem
A WMI array property (
IPAddress,IPSubnet,DefaultIPGatewayinWin32_NetworkAdapterConfiguration,CapabilitiesinWin32_DiskDrive...) came back with only its last element: WS-Management sends the array as sibling elements sharing one name, andWsmanClient.collectRowsoverwrote the previous value on each one. The 1.x CXF backend had the same defect (WinRMService.convertRowinv1.1.02), so no consumer relied on the old output.Change
WsmanClient.collectRowsjoins the sibling values (Map.merge), so every WQL path is fixed at once: fluent, streaming, legacy and CLI.|("192.0.2.10|fe80::1");WinRMClient.Builder.arraySeparator(String)changes it (builder-level, likeloadUserProfile()). LegacyLightWinRMService.createInstanceoverloads keep the default.WqlRow.get()/string()Javadoc now says what the code does: a WMINULLis an empty string (unchanged since 1.x, so legacyList<List<String>>consumers are not affected),nullmeans "no such property".Verification
IPAddress, a scalar in between, and anxsi:nilproperty; existing parity tests updated for the new parameter.mvn clean verify site: BUILD SUCCESS, 0 checkstyle / PMD / SpotBugs findings.SELECT Caption, IPAddress, IPSubnet, DefaultIPGateway FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled = TRUEreturns"IPAddress":"10.0.238.160|fe80::1d5c:d7e:62d0:160b","IPSubnet":"255.255.0.0|64"— both elements present on both hosts.Not done (on purpose)
List<List<Object>>/ typed CIM mapping variant: it needs a full CIM-to-Java type mapping and a second result API. The joined string covers the reported problem; open a follow-up issue if typed values are wanted.--array-separatoroption: the CLI emits|-joined strings; add the flag if someone asks.🤖 Generated with Claude Code