Skip to content

Fix the 117 PMD violations and gate pmd:check at verify (#114) - #120

Merged
bertysentry merged 2 commits into
mainfrom
114-pmd-fix-the-117-violations-reported-with-the-project-ruleset-empty-catch-blocks-threadrun-always-true-if-unary-operators-qualified-names-parentheses
Oct 7, 2026
Merged

bertysentry merged 2 commits into
mainfrom
114-pmd-fix-the-117-violations-reported-with-the-project-ruleset-empty-catch-blocks-threadrun-always-true-if-unary-operators-qualified-names-parentheses

Conversation

@bertysentry

Copy link
Copy Markdown
Contributor

Fixes #114.

What changed

Substantive (16 violations)

Mechanical (101 violations)

  • Self-qualified calls stripped in TypeConverter, the FRU records and SolAckState; useless parentheses removed in GetChassisStatusResponseData, CipherSuite, TypeConverter, GetSensorReading, FullSensorRecord.

Build

Verification

Reviewer notes

  • None of the fixes were validated against a real BMC; they are by inspection and unit test. The behavioural changes are the added logging, the interrupt-flag restoration and the 1 ms sleep in the SOL wait loop.
  • UdpMessenger(int) keeps its throws UnknownHostException clause for source compatibility even though nothing throws it any more.

🤖 Generated with Claude Code

Substantive fixes:
- Delete DecoderRunner, the unreferenced main() harness (27 violations, see #99)
- TypeConverter.decode1sComplement: replace -(~result) by result + 1 with a
  comment; add TypeConverterTest for 1's and 2's complement decoding
- GetFrusRunner: log FRU chunk read and decode failures instead of
  swallowing them, so a lost packet truncating a FRU is visible (see #102)
- AbstractIpmiRunner.close(): log the closeSession failure at debug
- ConnectionManager, MessageQueue, UdpMessenger: restore the interrupt flag
  instead of swallowing InterruptedException (cancellation rework stays in #79)
- SerialOverLan.waitForData: sleep 1 ms per iteration instead of busy-waiting
- ReadFruData: drop the dead else-if (false) branch, keep the SPD TODO (#107)
- UdpMessenger/UdpNotifier: drop super.run() from run(); bind the wildcard
  address with null instead of the hard-coded "0.0.0.0"
- IpmiAsyncConnector.closeSession: drop the useless return

Mechanical fixes: unnecessary self-qualifications in TypeConverter, the FRU
records and SolAckState; useless parentheses in GetChassisStatusResponseData,
CipherSuite, TypeConverter, GetSensorReading and FullSensorRecord.

Build: run pmd:check at verify with pmd.xml (cpd-check awaits #115) and pin
the reporting plugin to the same 3.28.0 so the site report matches the gate.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-07T17:34:00.617235Z b08a819 New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 70a1fde36e

ℹ️ 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".

Comment thread src/main/java/org/metricshub/ipmi/core/connection/ConnectionManager.java Outdated
wait(1) clears the interrupt flag when it throws, so restoring it inside the
loop made every following wait(1) throw immediately: an interrupted request
hot-spun while all 60 sessionless tags were reserved. Remember the interrupt
and restore it when the method returns; add a saturated-pool test.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
@bertysentry
bertysentry merged commit 6de92d7 into main Oct 7, 2026
4 checks passed
@bertysentry
bertysentry deleted the 114-pmd-fix-the-117-violations-reported-with-the-project-ruleset-empty-catch-blocks-threadrun-always-true-if-unary-operators-qualified-names-parentheses branch October 7, 2026 19:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant