selenium icon indicating copy to clipboard operation
selenium copied to clipboard

[java] SpotBugs exclude `DMI_HARDCODED_ABSOLUTE_FILENAME`

Open mk868 opened this issue 1 year ago • 2 comments

User description

Description

As described in this comment, SpotBugs found some additional bugs in the code. In this PR I fix part of the found problems.

SpotBugs errors:

M D DMI: Hard coded reference to an absolute pathname in org.openqa.selenium.safari.SafariTechPreviewDriverService.<static initializer for SafariTechPreviewDriverService>()  At SafariTechPreviewDriverService.java:[line 54]

documentation

Solution:
Exclude these class from SpotBugs checks, as it is already done for org.openqa.selenium.safari.SafariDriverService.

Motivation and Context

Fixing the actual problems is necessary before enabling full SpotBugs analysis, in order to not break the build.

Types of changes

  • [x] Bug fix (non-breaking change which fixes an issue)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • [x] I have read the contributing document.
  • [ ] My change requires a change to the documentation.
  • [ ] I have updated the documentation accordingly.
  • [ ] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.

PR Type

Bug fix


Description

  • Added a SpotBugs exclusion for the DMI_HARDCODED_ABSOLUTE_FILENAME bug pattern in the SafariTechPreviewDriverService class.
  • This change aligns with the existing exclusion for the SafariDriverService class.
  • The exclusion helps prevent build failures due to hardcoded absolute pathnames.

Changes walkthrough 📝

Relevant files
Bug fix
spotbugs-excludes.xml
Exclude DMI_HARDCODED_ABSOLUTE_FILENAME for
SafariTechPreviewDriverService

java/spotbugs-excludes.xml

  • Added exclusion for DMI_HARDCODED_ABSOLUTE_FILENAME bug pattern.
  • Applied exclusion to SafariTechPreviewDriverService class.
  • +5/-0     

    💡 PR-Agent usage: Comment /help "your question" on any pull request to receive relevant information

    mk868 avatar Oct 14 '24 16:10 mk868

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ No major issues detected

    qodo-code-review[bot] avatar Oct 14 '24 16:10 qodo-code-review[bot]

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    qodo-code-review[bot] avatar Oct 14 '24 16:10 qodo-code-review[bot]

    Hi, can we push forward this PR?

    mk868 avatar Dec 04 '24 08:12 mk868