Skip to content

Use _ for unused variables#15028

Merged
Siedlerchr merged 3 commits intomainfrom
underscores
Feb 4, 2026
Merged

Use _ for unused variables#15028
Siedlerchr merged 3 commits intomainfrom
underscores

Conversation

@koppor
Copy link
Copy Markdown
Member

@koppor koppor commented Feb 4, 2026

User description

Minor code updates

Mandatory checks


PR Type

Enhancement


Description

  • Replace unused lambda parameters with underscore placeholder

  • Improves code readability by explicitly marking unused variables

  • Applies Java convention for discarded values


Diagram Walkthrough

flowchart LR
  A["Lambda Parameters"] -- "Mark unused with _" --> B["Improved Code Clarity"]
  C["Event Handlers"] -- "Use _ for unused args" --> B
Loading

File Walkthrough

Relevant files
Enhancement
MultiMergeEntriesView.java
Replace unused lambda parameters with underscore                 

jabgui/src/main/java/org/jabref/gui/mergeentries/multiwaymerge/MultiMergeEntriesView.java

  • Replace unused observable and oldValue parameters with _ in
    sourceButton.selectedProperty().addListener() lambda
  • Replace unused event parameter with _ in doiButton.setOnAction()
    lambda
  • Improves code readability by explicitly marking discarded parameters
+2/-2     

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects Bot commented Feb 4, 2026

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

  • Update
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-free-for-open-source-projects
Copy link
Copy Markdown
Contributor

qodo-free-for-open-source-projects Bot commented Feb 4, 2026

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
Possible issue
Fix invalid lambda parameter syntax

Revert the lambda parameters from (_, , newValue) to (observable, oldValue,
newValue), as using duplicate
parameter names is invalid Java syntax and will
cause a compilation error.

jabgui/src/main/java/org/jabref/gui/mergeentries/multiwaymerge/MultiMergeEntriesView.java [235]

-sourceButton.selectedProperty().addListener((_, _, newValue) -> {
+sourceButton.selectedProperty().addListener((observable, oldValue, newValue) -> {
  • Apply / Chat
Suggestion importance[1-10]: 10

__

Why: The suggestion correctly identifies that the PR introduces a compilation error, as using multiple underscores for different lambda parameters is invalid Java syntax. Reverting this change is critical to ensure the code compiles.

High
  • Update

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Feb 4, 2026
@Siedlerchr Siedlerchr added this pull request to the merge queue Feb 4, 2026
@github-actions github-actions Bot added the status: to-be-merged PRs which are accepted and should go into the merge-queue. label Feb 4, 2026
Merged via the queue into main with commit f1df440 Feb 4, 2026
55 of 61 checks passed
@Siedlerchr Siedlerchr deleted the underscores branch February 4, 2026 10:01
Siedlerchr added a commit that referenced this pull request Feb 4, 2026
* upstream/main:
  New Crowdin updates (#15035)
  Use patched Gradle version (#15034)
  Add OpenAlex-based Citation Fetcher (#15023)
  Update null annotaitons at EntryBasedFetcher (#15024)
  Fix CHANGELOG.md test
  Use _ for unused variables (#15028)
  Use ubuntu-latest for checkstyle and javadoc
  Update Gradle Wrapper from 9.3.0-jabref-2 to 9.3.1 (#15021)
  Use "ubuntu-slim" for most workflows (#15019)
  Refine GroupsTree (#15013)
Siedlerchr added a commit to Jalina2007/jabref that referenced this pull request Feb 5, 2026
…4902

* upstream/main: (23 commits)
  Some more recipes from OpenRewrite (JabRef#15030)
  feat: Add PDF Upload endpoint to EntryResource (JabRef#14963)
  Heuristics also used at batch (JabRef#15025)
  Fix cleanup-pr.yml
  New Crowdin updates (JabRef#15035)
  Use patched Gradle version (JabRef#15034)
  Add OpenAlex-based Citation Fetcher (JabRef#15023)
  Update null annotaitons at EntryBasedFetcher (JabRef#15024)
  Fix CHANGELOG.md test
  Use _ for unused variables (JabRef#15028)
  Use ubuntu-latest for checkstyle and javadoc
  Update Gradle Wrapper from 9.3.0-jabref-2 to 9.3.1 (JabRef#15021)
  Use "ubuntu-slim" for most workflows (JabRef#15019)
  Refine GroupsTree (JabRef#15013)
  New Crowdin updates (JabRef#15018)
  Added Clear group option (JabRef#15017)
  Chore(deps): Bump com.uber.nullaway:nullaway from 0.12.15 to 0.13.1 in /versions (JabRef#15006)
  Chore(deps): Bump tools.jackson:jackson-bom in /versions (JabRef#15007)
  No rush in Docker building
  Yaml issue workaround
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Review effort 1/5 status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers status: to-be-merged PRs which are accepted and should go into the merge-queue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants