Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[java] SpotBugs exclude DMI_HARDCODED_ABSOLUTE_FILENAME #14597

Merged

Conversation

mk868
Copy link
Contributor

@mk868 mk868 commented Oct 14, 2024

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

  • 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

  • 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

    Copy link
    Contributor

    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

    Copy link
    Contributor

    PR Code Suggestions ✨

    No code suggestions found for the PR.

    @mk868 mk868 force-pushed the safari-DMI_HARDCODED_ABSOLUTE_FILENAME branch from c5ef9ba to 3a3dfb9 Compare October 23, 2024 08:33
    @mk868 mk868 force-pushed the safari-DMI_HARDCODED_ABSOLUTE_FILENAME branch from 3a3dfb9 to 5fd8265 Compare November 14, 2024 08:33
    @VietND96 VietND96 requested a review from pujagani November 14, 2024 09:11
    @mk868
    Copy link
    Contributor Author

    mk868 commented Dec 4, 2024

    Hi, can we push forward this PR?

    Copy link
    Contributor

    @pujagani pujagani left a comment

    Choose a reason for hiding this comment

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

    Thank you @mk868 !

    @pujagani pujagani merged commit c286473 into SeleniumHQ:trunk Dec 5, 2024
    3 of 4 checks passed
    @mk868 mk868 deleted the safari-DMI_HARDCODED_ABSOLUTE_FILENAME branch December 5, 2024 05:30
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants