Skip to content

fix: improve VulnerableSoftware comparison#8031

Merged
jeremylong merged 1 commit intomainfrom
fix-comparison
Oct 13, 2025
Merged

fix: improve VulnerableSoftware comparison#8031
jeremylong merged 1 commit intomainfrom
fix-comparison

Conversation

@jeremylong
Copy link
Copy Markdown
Collaborator

Description of Change

Intermittent test failure, as seen https://github.com/dependency-check/DependencyCheck/actions/runs/18444777553/job/52549923196. Amp suggested this fix to resolve the failure.

@boring-cyborg boring-cyborg Bot added the core changes to core label Oct 12, 2025
@jeremylong jeremylong requested a review from Copilot October 13, 2025 13:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses intermittent test failures by improving the comparison logic in the VulnerableSoftware class to handle null and empty string values consistently.

  • Adds a utility method to normalize null and empty strings for comparison
  • Updates the compareTo method to use normalized values for version-related fields
  • Ensures consistent comparison behavior regardless of whether fields contain null or empty strings

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@jeremylong jeremylong added this to the 12.1.8 milestone Oct 13, 2025
@jeremylong jeremylong merged commit 8230ba2 into main Oct 13, 2025
5 checks passed
@jeremylong jeremylong deleted the fix-comparison branch October 13, 2025 14:17
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

core changes to core

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants