Skip to content

Dedup the LogicalVolumeGroup bindings - #3546

Merged
dbwiddis merged 2 commits into
oshi:masterfrom
dbwiddis:lvg-dedup
Jul 29, 2026
Merged

dbwiddis merged 2 commits into
oshi:masterfrom
dbwiddis:lvg-dedup

Conversation

@dbwiddis

@dbwiddis dbwiddis commented Jul 29, 2026 •

Copy link
Copy Markdown
Member

Audit item 12. 8 files, 253+/272−.

Windows — the bulk of it

Windows was the only platform whose volume group class had no common base, so both bindings carried a full copy of the Storage Spaces correlation: pull object IDs out of four MSFT_Storage queries, then match pools to their physical and virtual disks by GUID substring.

The queries return WmiResult, which is already backend-neutral, so the only real difference was the COM plumbing that runs them. New WindowsLogicalVolumeGroup base takes the four results plus a factory (the #3452/#3544 pattern); the bindings keep the version gate, COM init/uninit, the queries, and their own exception type.

before after
WindowsLogicalVolumeGroupJNA 162 61
WindowsLogicalVolumeGroupFFM 145 60

The "query storage pools first so we can skip the other three queries when there are none" short-circuit is preserved — the early return still happens before the other queries are issued.

Linux

Linux already had a base for the pvs parsing, but both bindings still repeated the device-mapper filtering, the sysfs slaves scan and the group assembly around their own udev enumeration. The bindings now return each block device's udev attributes as a carrier and the base does the rest — the same hook boundary the USB enumeration uses (#3448), since the udev call itself is irreducibly different (JNA UdevContext vs FFM MemorySegment).

One divergence unified

JNA looked the physical volume set up with physicalVolumesMap.get(...), FFM with getOrDefault(..., emptySet()). Both maps are computeIfAbsent-populated in the same block so the null was unreachable — but a null set throws in AbstractLogicalVolumeGroup's immutable-copy constructor rather than degrading, so the defaulting form is the one kept.

Tests

Both shared methods are pure, so they are now covered without Windows, Linux, or LVM configured — paths that were previously unreachable in CI at all, since Storage Spaces needs pooled disks and LVM needs volume groups.

  • WindowsLogicalVolumeGroupTest stubs the four WmiResults: correlation of a pool with its disks and volumes, two pools not bleeding into each other (the substring match this logic exists to get right), an unknown physical disk being skipped rather than yielding null @ null, unparseable object IDs degrading instead of throwing, and multiple volumes in one pool. One test pins the fixture itself against the production regexes, so a fixture that stopped matching can't leave the others passing vacuously.
  • LinuxLogicalVolumeGroupTest gains assembly coverage using a @TempDir as a stand-in for sysfs: slaves-directory expansion, two volumes sharing a group, non-LVM devices filtered (plain disk, LUKS-owned device-mapper node, blank/null udev properties), a missing slaves directory still yielding the group, and pvs results merged with rather than replaced by the slaves scan.

Full gate green on oshi-common,oshi-core,oshi-core-ffm plus a clean full-reactor install, 0 tests failed. Windows and Linux runtime paths are CI-only; pr.yaml runs both automatically.

No CHANGELOG — no user-observable behavior change.

Summary by CodeRabbit

  • New Features
    • Enhanced logical volume group discovery on Linux, focusing on device-mapper LVM devices and physical volume relationships.
    • Improved Windows Storage Spaces logical volume group discovery by correlating virtual and physical disks per storage pool.
  • Bug Fixes
    • Fixed Windows correlation when storage pool identifiers are missing/unparseable, preventing incorrect “match-everything” results.
    • Linux discovery now safely handles missing/incomplete device metadata without breaking grouping.
  • Tests
    • Added/expanded Linux and Windows regression coverage for filtering, merging, and degraded metadata scenarios.

Windows was the only platform whose volume group class had no common
base, so its two bindings each carried a full copy of the Storage Spaces
correlation: parse the object IDs out of four MSFT_Storage queries, then
match pools to their physical and virtual disks by GUID substring. The
queries return WmiResult, which is already backend-neutral, so only the
COM plumbing that runs them actually differs. A new
WindowsLogicalVolumeGroup base holds the correlation and takes the four
results plus a factory; the bindings keep the version gate, the COM
init, and the queries themselves. They drop from 162 and 145 lines to
61 and 60.

Linux already had a base for the pvs parsing, but both bindings still
repeated the device-mapper filtering, the sysfs slaves scan and the
volume group assembly around their own udev enumeration. The bindings
now return the udev attributes of each block device as a carrier and the
base does the rest, which is the same boundary the USB enumeration uses.

Unifies one divergence between the Linux bindings: JNA looked the
physical volume set up with get, FFM with getOrDefault and an empty
default. Both maps are populated together so the null could not be
reached, but a null set would throw in the immutable-copy constructor
rather than degrade, so the defaulting form is kept.

Both shared methods are pure, so they are now covered without Windows,
Linux or LVM: the Storage Spaces correlation against stubbed WmiResults,
and the volume group assembly against a temporary directory standing in
for sysfs.
@coderabbitai

coderabbitai Bot commented Jul 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 9f0cf5aa-c075-427b-a6ee-d42c6992625a

📥 Commits

Reviewing files that changed from the base of the PR and between ed5ea16 and dabde93.

📒 Files selected for processing (2)
  • oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java
  • oshi-common/src/test/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroupTest.java
📜 Recent review details
⏰ Context from checks skipped due to timeout. (6)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Test JDK 26, ubuntu-latest
  • GitHub Check: Test JDK 25, ubuntu-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
  • GitHub Check: Test JDK 25, windows-latest (+ JNA==FFM)
  • GitHub Check: Analyze (java)
🧰 Additional context used
🧠 Learnings (2)
📚 Learning: 2026-04-12T19:22:09.716Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3149
File: oshi-common/src/main/java/oshi/hardware/common/platform/mac/MacCentralProcessor.java:159-163
Timestamp: 2026-04-12T19:22:09.716Z
Learning: When reviewing OSHI hardware platform code that uses or implements `CentralProcessor`/`PhysicalProcessor.getEfficiency()`, remember the API’s counterintuitive semantics: a *higher* efficiency-class value indicates *greater performance* (lower efficiency). P-cores/“performance cores” should therefore have higher values (e.g., 1) than E-cores/“efficiency cores” (e.g., 0), as documented in the `CentralProcessor` Javadoc. Do not flag code as incorrect solely because ARM_P_CORES or Intel P-cores are assigned higher efficiency values.

Applied to files:

  • oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java
📚 Learning: 2026-07-06T19:25:59.225Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3432
File: oshi-common/src/main/java/oshi/util/ExceptionUtil.java:26-56
Timestamp: 2026-07-06T19:25:59.225Z
Learning: In this repo’s SLF4J 1.x-compatible logging code, do not flag cases where a logger call uses SLF4J 1.6+ implicit-cause handling—e.g., `log.error("...{}", value, t)` (or similar with a single `{}` placeholder) where `t` is passed as the final/trailing argument. SLF4J will attach `t` as the log event’s cause with the full stack trace; this is equivalent to SLF4J 2.x’s fluent `atLevel(...).setCause(t).log(...)` and is intentionally used to preserve SLF4J 1.x runtime compatibility.

Applied to files:

  • oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java
🔇 Additional comments (2)
oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java (1)

139-161: LGTM!

oshi-common/src/test/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroupTest.java (1)

8-8: LGTM!

Also applies to: 200-225


📝 Walkthrough

Walkthrough

Shared Linux and Windows implementations now assemble logical volume groups from platform-specific discovery data. FFM and JNA bindings collect native data and delegate construction to these implementations, with tests covering correlation and edge cases.

Changes

Logical volume group assembly

Layer / File(s) Summary
Linux udev-to-LVM builder
oshi-common/src/main/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroup.java
Adds udev device data, factory construction, LVM filtering, sysfs slave discovery, and per-group logical/physical volume assembly.
Linux binding integration and validation
oshi-core-ffm/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupFFM.java, oshi-core/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupJNA.java, oshi-common/src/test/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroupTest.java
Native bindings enumerate udev properties and delegate to the shared builder; tests cover filtering, merging, empty results, and missing slaves.
Windows Storage Spaces correlator
oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java
Adds shared WMI correlation for storage pools, virtual disks, physical disks, and pool associations, including validation for missing or malformed pool identifiers.
Windows binding integration and validation
oshi-core-ffm/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupFFM.java, oshi-core/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupJNA.java, oshi-common/src/test/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroupTest.java
Native bindings delegate WMI processing to the shared implementation; tests cover pool isolation, missing disks, malformed identifiers, and multiple volumes.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant LinuxBinding
  participant LinuxBuilder
  participant Sysfs
  LinuxBinding->>LinuxBuilder: pass enumerated udev devices
  LinuxBuilder->>Sysfs: read LVM slave devices
  Sysfs-->>LinuxBuilder: return physical-volume paths
  LinuxBuilder-->>LinuxBinding: return logical volume groups
Loading
sequenceDiagram
  participant WindowsBinding
  participant WMI
  participant WindowsBuilder
  WindowsBinding->>WMI: query Storage Spaces data
  WMI-->>WindowsBinding: return pools and disk relationships
  WindowsBinding->>WindowsBuilder: pass WMI results
  WindowsBuilder-->>WindowsBinding: return correlated logical volume groups
Loading

Poem

I’m a rabbit with volumes in line,
LVM leaves and WMI paths combine.
FFM and JNA hop through the gate,
Shared builders sort every crate.
Tests thump their paws: “All groups look great!”

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly matches the main goal of deduplicating LogicalVolumeGroup bindings across platforms.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
oshi-common/src/test/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroupTest.java (1)

191-203: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Assert the "no correlation" outcome, not just that nothing threw.

The test name claims degradation to no correlation, but only size and name are checked. Asserting empty volumes pins the actual contract and would catch a regression where the unmatched ObjectId became an empty string (which contains matches against everything).

💚 Proposed assertions
         assertThat(lvgs, hasSize(1));
         assertThat(lvgs.get(0).getName(), is("Pool1"));
+        assertThat("An unparseable pool ObjectId correlates to nothing", lvgs.get(0).getPhysicalVolumes(),
+                is(empty()));
+        assertThat(lvgs.get(0).getLogicalVolumes().keySet(), is(empty()));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In
`@oshi-common/src/test/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroupTest.java`
around lines 191 - 203, Update testUnparseableObjectIdsDoNotThrow to assert that
the resulting LogicalVolumeGroup has no correlated volumes, in addition to the
existing size and name checks. Verify the group's volumes collection is empty so
an invalid OBJECTID cannot accidentally match all entries.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In
`@oshi-common/src/test/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroupTest.java`:
- Around line 191-203: Update testUnparseableObjectIdsDoNotThrow to assert that
the resulting LogicalVolumeGroup has no correlated volumes, in addition to the
existing size and name checks. Verify the group's volumes collection is empty so
an invalid OBJECTID cannot accidentally match all entries.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 92beed03-095a-4fa4-8283-c7566fe0eae9

📥 Commits

Reviewing files that changed from the base of the PR and between d89f6b6 and ed5ea16.

📒 Files selected for processing (8)
  • oshi-common/src/main/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroup.java
  • oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java
  • oshi-common/src/test/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroupTest.java
  • oshi-common/src/test/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroupTest.java
  • oshi-core-ffm/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupFFM.java
  • oshi-core-ffm/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupFFM.java
  • oshi-core/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupJNA.java
  • oshi-core/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupJNA.java
📜 Review details
⏰ Context from checks skipped due to timeout. (5)
  • GitHub Check: Codacy Static Code Analysis
  • GitHub Check: Test JDK 25, macos-latest (+ JNA==FFM)
  • GitHub Check: Analyze (java)
  • GitHub Check: Lint (Spotless, Checkstyle, ForbiddenAPIs, Javadoc)
  • GitHub Check: Test JDK 25, windows-latest (+ JNA==FFM)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2026-04-12T19:22:09.716Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3149
File: oshi-common/src/main/java/oshi/hardware/common/platform/mac/MacCentralProcessor.java:159-163
Timestamp: 2026-04-12T19:22:09.716Z
Learning: When reviewing OSHI hardware platform code that uses or implements `CentralProcessor`/`PhysicalProcessor.getEfficiency()`, remember the API’s counterintuitive semantics: a *higher* efficiency-class value indicates *greater performance* (lower efficiency). P-cores/“performance cores” should therefore have higher values (e.g., 1) than E-cores/“efficiency cores” (e.g., 0), as documented in the `CentralProcessor` Javadoc. Do not flag code as incorrect solely because ARM_P_CORES or Intel P-cores are assigned higher efficiency values.

Applied to files:

  • oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java
  • oshi-common/src/main/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroup.java
📚 Learning: 2026-07-06T19:25:59.225Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3432
File: oshi-common/src/main/java/oshi/util/ExceptionUtil.java:26-56
Timestamp: 2026-07-06T19:25:59.225Z
Learning: In this repo’s SLF4J 1.x-compatible logging code, do not flag cases where a logger call uses SLF4J 1.6+ implicit-cause handling—e.g., `log.error("...{}", value, t)` (or similar with a single `{}` placeholder) where `t` is passed as the final/trailing argument. SLF4J will attach `t` as the log event’s cause with the full stack trace; this is equivalent to SLF4J 2.x’s fluent `atLevel(...).setCause(t).log(...)` and is intentionally used to preserve SLF4J 1.x runtime compatibility.

Applied to files:

  • oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java
  • oshi-core/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupJNA.java
  • oshi-core-ffm/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupFFM.java
  • oshi-common/src/main/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroup.java
  • oshi-core/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupJNA.java
  • oshi-core-ffm/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupFFM.java
📚 Learning: 2026-04-06T04:45:47.644Z
Learnt from: dbwiddis
Repo: oshi/oshi PR: 3121
File: oshi-core/src/main/java/oshi/software/os/linux/LinuxOperatingSystem.java:53-53
Timestamp: 2026-04-06T04:45:47.644Z
Learning: In the oshi/oshi project, only interfaces and classes in the root packages `oshi`, `oshi.hardware`, and `oshi.software.os` are considered the public API. Code in subpackages that represent specific implementations/platforms (e.g., `oshi.software.os.linux`, `oshi.hardware.platform.linux`, and similar subpackages) is implementation detail. When reviewing, do not treat changes to classes in these platform-specific subpackages as public API breaks (for example: making `LinuxOperatingSystem` abstract, narrowing constructor visibility, or adding/removing abstract methods should not be flagged as breaking public API).

Applied to files:

  • oshi-core/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupJNA.java
  • oshi-core/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupJNA.java
🔇 Additional comments (11)
oshi-common/src/main/java/oshi/hardware/common/platform/windows/WindowsLogicalVolumeGroup.java (1)

35-50: LGTM!

Also applies to: 78-161

oshi-core/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupJNA.java (1)

23-26: LGTM!

Also applies to: 47-51

oshi-core-ffm/src/main/java/oshi/hardware/platform/windows/WindowsLogicalVolumeGroupFFM.java (1)

23-23: 📐 Maintainability & Code Quality

JPMS export is already present.

oshi-common/src/main/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroup.java (2)

7-21: LGTM!


76-172: LGTM!

oshi-core-ffm/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupFFM.java (2)

12-50: LGTM!


72-83: LGTM!

oshi-core/src/main/java/oshi/hardware/platform/linux/LinuxLogicalVolumeGroupJNA.java (2)

9-46: LGTM!


55-75: LGTM!

oshi-common/src/test/java/oshi/hardware/common/platform/linux/LinuxLogicalVolumeGroupTest.java (2)

11-88: LGTM!


90-159: LGTM!

@codecov

codecov Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 91.50943% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 79.31%. Comparing base (d89f6b6) to head (dabde93).

Files with missing lines Patch % Lines
...on/platform/windows/WindowsLogicalVolumeGroup.java 93.22% 0 Missing and 4 partials ⚠️
...are/platform/linux/LinuxLogicalVolumeGroupJNA.java 66.66% 2 Missing and 1 partial ⚠️
...common/platform/linux/LinuxLogicalVolumeGroup.java 96.55% 0 Missing and 1 partial ⚠️
...are/platform/linux/LinuxLogicalVolumeGroupFFM.java 88.88% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #3546      +/-   ##
============================================
+ Coverage     79.18%   79.31%   +0.12%     
  Complexity     3762     3762              
============================================
  Files           703      704       +1     
  Lines         24265    24320      +55     
  Branches       4038     4050      +12     
============================================
+ Hits          19214    19289      +75     
+ Misses         2869     2841      -28     
- Partials       2182     2190       +8     
Flag Coverage Δ
linux 36.31% <91.50%> (+0.28%) ⬆️
macos 37.23% <77.35%> (+0.27%) ⬆️
windows 44.24% <51.88%> (+0.12%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Pool members are matched by substring, and every string contains the
empty one, so an empty pool ObjectId matched every entry rather than
none. WmiUtil maps an absent property to an empty string, so a storage
pool whose ObjectId did not come back would be reported as owning every
physical disk and every virtual disk on the system.

An unparseable ObjectId was already safe, because the raw value is kept
when the regex does not match and a non-empty value still fails the
substring test. Only the empty case was wrong, so the guard is on that.

This is the same trap the graphics card audit found twice, where an
empty candidate or an empty needle matched everything.

Asserting the correlation is empty, rather than only that the group
exists, is what exposed it; the unparseable-ObjectId test now checks
that too.
@dbwiddis
dbwiddis merged commit 3b42043 into oshi:master Jul 29, 2026
25 of 27 checks passed
@dbwiddis
dbwiddis deleted the lvg-dedup branch July 29, 2026 23:32
dbwiddis added a commit that referenced this pull request Aug 2, 2026
CodeQL Code Quality reported seven java/index-out-of-bounds findings
(severity error) across the two test files added in #3543 and #3546.

Each finding is the same shape: a private varargs helper walks its
arguments in fixed-size groups, striding by two or three, but bounds the
loop on the first index of the group rather than the last. Reading
namesAndIds[i + 1] under a loop guarded only by i < namesAndIds.length
runs off the end whenever the caller passes a partial group.

Unlike the useless-null-check and dereferenced-value-may-be-null
findings on these files, this one is not a false positive. Every call
site today passes a complete multiple, so nothing can throw as written,
but the helpers make no such guarantee and the finding will resurface
each time the files move.

Bounding each loop on the last index it reads is what CodeQL's range
analysis needs to see, and it turns a would-be
ArrayIndexOutOfBoundsException into one fewer row for a caller that
miscounts -- which a test's own assertions will catch immediately.

The two production stride loops were checked and left alone:
ParseUtil.hexStringToByteArray already rejects odd-length input with an
explicit (len & 0x1) != 0 guard, and
HkeyPerformanceDataUtil.buildCounterIndexMap starts at i = 1 and reads
backwards to i - 1, so both indices are always in range. Neither was
flagged.

Test-only, so no CHANGELOG entry.
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.

1 participant