Skip to content

OF-3266: Fix wrong getter used in setAcceptSelfSignedCertificates#3308

Merged
akrherz merged 1 commit into
igniterealtime:mainfrom
guusdk:OF-3266_ConnectionListener-setAcceptSelfSignedCertificates
May 7, 2026
Merged

OF-3266: Fix wrong getter used in setAcceptSelfSignedCertificates#3308
akrherz merged 1 commit into
igniterealtime:mainfrom
guusdk:OF-3266_ConnectionListener-setAcceptSelfSignedCertificates

Conversation

@guusdk
Copy link
Copy Markdown
Member

@guusdk guusdk commented May 6, 2026

Use acceptSelfSignedCertificates() instead of verifyCertificateValidity() to determine the previous value.

The old implementation compared unrelated settings, which could prevent required restarts or trigger unnecessary ones.

Summary by CodeRabbit

  • Bug Fixes
    • Improved accuracy of self-signed certificate acceptance policy change detection.

Use acceptSelfSignedCertificates() instead of verifyCertificateValidity() to determine the previous value.

The old implementation compared unrelated settings, which could prevent required restarts or trigger unnecessary ones.
@guusdk
Copy link
Copy Markdown
Member Author

guusdk commented May 6, 2026

@coderabbitai review please

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 686e763a-908d-4ee6-b31d-92482f05b381

📥 Commits

Reviewing files that changed from the base of the PR and between 6713974 and cdaee01.

📒 Files selected for processing (1)
  • xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionListener.java

📝 Walkthrough

Walkthrough

A single-line behavioral fix in ConnectionListener.setAcceptSelfSignedCertificates updates the oldValue calculation to capture the current self-signed certificate acceptance state instead of the certificate validity setting, correcting change-detection logic for restart triggers.

Changes

Self-Signed Certificate State Detection

Layer / File(s) Summary
Change Detection Logic
xmppserver/src/main/java/org/jivesoftware/openfire/spi/ConnectionListener.java
The oldValue in setAcceptSelfSignedCertificates now reads from the current self-signed certificate acceptance state rather than certificate validity, ensuring proper change detection when the acceptance policy is modified.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

🐰 A single line, so small yet true,
Changed where oldValue gets its cue—
From cert's age to policy's voice,
Detection now makes the right choice!
Restart detection, now more wise.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and specifically describes the main fix: correcting a wrong getter method used in the setAcceptSelfSignedCertificates function, which directly aligns with the changeset's primary objective.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Tip

💬 Introducing Slack Agent: The best way for teams to turn conversations into code.

Slack Agent is built on CodeRabbit's deep understanding of your code, so your team can collaborate across the entire SDLC without losing context.

  • Generate code and open pull requests
  • Plan features and break down work
  • Investigate incidents and troubleshoot customer tickets together
  • Automate recurring tasks and respond to alerts with triggers
  • Summarize progress and report instantly

Built for teams:

  • Shared memory across your entire org—no repeating context
  • Per-thread sandboxes to safely plan and execute work
  • Governance built-in—scoped access, auditability, and budget controls

One agent for your entire SDLC. Right inside Slack.

👉 Get started


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

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Tip

For best results, initiate chat on the files or code changes.

@guusdk Sure, I'll review the changes now!

[review]

@guusdk guusdk added the backport 5.0 on merge, GHA will generate a PR with these changes against 5.0 branch label May 6, 2026
@guusdk
Copy link
Copy Markdown
Member Author

guusdk commented May 7, 2026

@coderabbitai help

Why are you so verbose in your comments? I can do without the tips and hints etc.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 7, 2026

Tip

For best results, initiate chat on the files or code changes.

@guusdk — Fair point! Here are two ways to reduce verbosity:

1. Add a .coderabbit.yaml to the repo root

You can set the tone of reviews and chat using tone_instructions, and use reviews.instructions to provide natural language guidance that applies to every PR and sets the overall tone of reviews.

# .coderabbit.yaml
tone_instructions: "Be concise and direct. Skip tips, hints, and suggestions about how to interact with CodeRabbit."
reviews:
  instructions: "Keep review comments brief and focused on bugs, security, and logic errors only. Do not include tips, hints, or meta-commentary."

2. Use the CodeRabbit UI

You can configure the same settings via the CodeRabbit dashboard without committing a file. To convert your existing UI configuration to YAML, use the @coderabbitai configuration command on any PR.

The "For best results…" tip in my previous reply was a fixed template triggered by the help command — the tone_instructions setting should suppress that kind of boilerplate in regular review interactions going forward.


✏️ Learnings added
Learnt from: guusdk
URL: https://github.com/igniterealtime/Openfire/pull/3308

Timestamp: 2026-05-07T09:47:00.980Z
Learning: guusdk (maintainer of igniterealtime/Openfire) prefers concise, direct responses without tips, hints, or meta-commentary. Do not include "TIP" callouts, suggestions about how to interact with CodeRabbit, or any other boilerplate/verbose text in responses to this user.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.

@akrherz akrherz merged commit a83584d into igniterealtime:main May 7, 2026
64 of 65 checks passed
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 7, 2026

Successfully created backport PR for 5.0:

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

Labels

backport 5.0 on merge, GHA will generate a PR with these changes against 5.0 branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants