FIX LOC Test and improve Mods Importer entry type parsing - #16279
Conversation
* upstream/main: Chore(deps): Bump com.autonomousapps:dependency-analysis-gradle-plugin (#16276) Chore(deps): Bump com.gradleup.shadow:shadow-gradle-plugin (#16275) Chore(deps): Bump com.gradleup.shadow:shadow-gradle-plugin (#16277) Chore(deps): Bump com.autonomousapps:dependency-analysis-gradle-plugin (#16274) Render AI summaries with MarkdownTextFlow instead of WebView (#16189)
PR Summary by QodoFix LOC MODS import tests and harden MODS entry type inference
AI Description
Diagram
High-Level Assessment
Files changed (12)
|
Code Review by Qodo
1. assertTrue(inputStream != null) used
|
| try (InputStream inputStream = LibraryOfCongressTest.class.getResourceAsStream("library_of_congress_2010045158_mods.xml")) { | ||
| assertTrue(inputStream != null); | ||
|
|
There was a problem hiding this comment.
1. asserttrue(inputstream != null) used 📘 Rule violation ⚙ Maintainability
The new test asserts non-null via assertTrue(inputStream != null) instead of using a dedicated JUnit assertion. This reduces test clarity and violates the project’s test conventions preferring specific assertions over broad boolean checks.
Agent Prompt
## Issue description
A test uses `assertTrue(inputStream != null)` for a null check, which is discouraged in JabRef’s JUnit conventions.
## Issue Context
The compliance checklist prefers specific JUnit assertions over broad boolean assertions when asserting object state.
## Fix Focus Areas
- jablib/src/test/java/org/jabref/logic/importer/fetcher/LibraryOfCongressTest.java[63-65]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
Related issues and pull requests
Closes #16055
PR Description
Fix LOC test and improve Mods entry type mapping, inspired by xml2bib util
Prevents stupid entry types like
textAdd rate limiting at 10 request per minute
Steps to test
Import a mods book xml file
AI usage
GPT 5.4
AI CHECKLIST.md walkthrough
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)