Skip to content

[java] Fix code formatting #15903

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

Merged
merged 1 commit into from
Jun 16, 2025
Merged

Conversation

cgoldberg
Copy link
Contributor

@cgoldberg cgoldberg commented Jun 16, 2025

User description

💥 What does this PR do?

Fix code formatting issues introduced in 401e5dd and 6f4ce7e

🔄 Types of changes

  • Cleanup (formatting, renaming)

PR Type

Other


Description

• Fix indentation and formatting in BrowsingContext methods
• Standardize constructor parameter alignment in BrowsingContextInfo
• Remove unnecessary blank line in test imports


Changes walkthrough 📝

Relevant files
Formatting
BrowsingContext.java
Fix method indentation and parameter alignment                     

java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContext.java

• Fixed indentation for getTree() method overloads
• Standardized
parameter alignment in Command constructors

+8/-8     
BrowsingContextInfo.java
Improve constructor and method parameter formatting           

java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInfo.java

• Split constructor parameters across multiple lines with proper
indentation
• Fixed parameter alignment in fromJson() return statement

+9/-2     
BrowsingContextTest.java
Clean up import formatting                                                             

java/test/org/openqa/selenium/bidi/browsingcontext/BrowsingContextTest.java

• Removed unnecessary blank line between imports

+0/-1     

Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @selenium-ci selenium-ci added C-java Java Bindings B-devtools Includes everything BiDi or Chrome DevTools related labels Jun 16, 2025
    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

    @cgoldberg cgoldberg merged commit b4678fc into SeleniumHQ:trunk Jun 16, 2025
    7 of 8 checks passed
    @cgoldberg cgoldberg deleted the java-fix-formatting branch June 16, 2025 15:55
    Copy link
    Contributor

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    General
    Format constructor parameters consistently

    The constructor call should have each parameter on its own line for better
    readability and consistency with the constructor definition. This improves
    maintainability when parameters need to be modified.

    java/src/org/openqa/selenium/bidi/browsingcontext/BrowsingContextInfo.java [134-135]

     return new BrowsingContextInfo(
    -    id, url, children, clientWindow, originalOpener, userContext, parentBrowsingContext);
    +    id,
    +    url,
    +    children,
    +    clientWindow,
    +    originalOpener,
    +    userContext,
    +    parentBrowsingContext);
    • Apply / Chat
    Suggestion importance[1-10]: 5

    __

    Why: The suggestion correctly identifies a formatting inconsistency. The PR updated the BrowsingContextInfo constructor definition to have one parameter per line, but the call to this constructor in the fromJson method was not updated to match this style, making the code less consistent and readable.

    Low
    • More

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    B-devtools Includes everything BiDi or Chrome DevTools related C-java Java Bindings Review effort 1/5
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    2 participants