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

Bring back a modified ISBN check and add more tests #11217

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

AbdAlRahmanGad
Copy link
Contributor

Closes #8885

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

Copy link
Member

@koppor koppor 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 for the follow-up. Small comment remaining.

Comment on lines 347 to 349
if (oneISBN.isPresent() && twoISBN.isPresent()
&& !List.of(StandardEntryType.Article, StandardEntryType.InBook, StandardEntryType.InCollection).contains(one.getType())
&& Objects.equals(oneISBN, twoISBN)) {
Copy link
Member

Choose a reason for hiding this comment

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

I would flip List.of and Objects.equals, because oneISBN is checked in line 347 and then the subsequent line 348 is closer. Otherwise, the condition is harder to read, because it switches between ISBN, types, and ISBN.

@koppor koppor added this pull request to the merge queue Apr 18, 2024
Merged via the queue into JabRef:main with commit 2b5fddd Apr 18, 2024
20 checks passed
@AbdAlRahmanGad AbdAlRahmanGad deleted the Duplicate_check branch April 25, 2024 13:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Duplicate check during import marks articles from collection as possible duplicates
2 participants