Refine code#15132
Conversation
Review Summary by QodoExtract CitationCountFetcher interface and refine code
WalkthroughsDescription• Extract getCitationCount method into new CitationCountFetcher interface • Make CitationFetcher extend the new CitationCountFetcher interface • Remove empty lines from PdfMergeDialog for cleaner code formatting Diagramflowchart LR
A["CitationCountFetcher<br/>interface"] -->|"extends"| B["CitationFetcher<br/>interface"]
C["PdfMergeDialog"] -->|"cleanup"| D["Remove empty lines"]
File Changes1. jablib/src/main/java/org/jabref/logic/importer/fetcher/citation/CitationCountFetcher.java
|
Code Review by Qodo
1. CitationCountFetcher missing @NullMarked
|
| public interface CitationCountFetcher { | ||
| /// Get the paper details that includes citation count field for a given {@link BibEntry}. | ||
| /// | ||
| /// @param entry entry to search citation count field | ||
| /// @return returns a {@link Integer} for citation count field (may be empty) | ||
| Optional<Integer> getCitationCount(BibEntry entry) throws FetcherException; |
There was a problem hiding this comment.
1. citationcountfetcher missing @NullMarked 📘 Rule violation ✓ Correctness
The newly introduced public interface CitationCountFetcher defines a public API without JSpecify null-marking, making nullability contracts unclear and potentially triggering nullness/quality-gate issues. This violates the project expectation to use JSpecify for nullability in new public APIs.
Agent Prompt
## Issue description
A new public interface (`CitationCountFetcher`) was introduced without JSpecify null-marking, which makes nullability expectations unclear and inconsistent with other interfaces in the same package.
## Issue Context
`CitationFetcher` in the same package is annotated with `@NullMarked`, suggesting the package expects JSpecify nullness defaults for public APIs.
## Fix Focus Areas
- jablib/src/main/java/org/jabref/logic/importer/fetcher/citation/CitationCountFetcher.java[1-14]
- jablib/src/main/java/org/jabref/logic/importer/fetcher/citation/CitationFetcher.java[10-15]
ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools
✅ All tests passed ✅🏷️ Commit: 99000ea Learn more about TestLens at testlens.app. |
* Remove empty lines * Extract interface * Add JSpecify annotation
* upstream/main: (26 commits) Fix matrix Feature visual timer 15122 (JabRef#15151) Chore(deps): Bump com.googlecode.plist:dd-plist from 1.28 to 1.29 in /versions (JabRef#15166) Chore(deps): Bump jablib/src/main/resources/csl-styles from `a0eb8d7` to `e306b56` (JabRef#15162) Chore(deps): Bump io.zonky.test.postgres:embedded-postgres-binaries-bom (JabRef#15165) Chore(deps): Bump jablib/src/main/resources/csl-locales (JabRef#15163) Chore(deps): Bump jablib/src/main/abbrv.jabref.org (JabRef#15164) Change Dependabot schedule from weekly to daily macos-15-intel should run on main only (JabRef#15161) Chore(deps): Bump jablib/src/main/resources/csl-styles (JabRef#15152) Chore(deps): Bump org.jetbrains:annotations in /versions (JabRef#15154) Chore(deps): Bump jablib/src/main/abbrv.jabref.org (JabRef#15153) Chore(deps): Bump org.itsallcode.openfasttrace from 3.1.0 to 3.1.1 (JabRef#15141) Chore(deps): Bump org.junit:junit-bom from 6.0.2 to 6.0.3 in /versions (JabRef#15148) Chore(deps): Bump org.eclipse.lsp4j:org.eclipse.lsp4j from 0.24.0 to 1.0.0 in /versions (JabRef#15149) Chore(deps): Bump org.postgresql:postgresql in /versions (JabRef#15146) Chore(deps): Bump net.bytebuddy:byte-buddy in /versions (JabRef#15147) Refine code (JabRef#15132) Chore(deps): Bump com.dlsc.gemsfx:gemsfx in /versions (JabRef#15143) Update dependency de.undercouch:citeproc-java to v3.5.0 (JabRef#15145) ...
* Remove empty lines * Extract interface * Add JSpecify annotation --------- Co-authored-by: Christoph <siedlerkiller@gmail.com>
Checklist
CHANGELOG.mdin a way that can be understood by the average user (if change is visible to the user)