Skip to content

Conversation

@vivek1833
Copy link

Issue

Fixes #14089

Changes

This PR refactors DoiFetcher.performSearchById to use BibtexParser.parseEntries() instead of BibtexParser.singleFromString() and makes the asString(Charset, URLConnection) method private in URLDownload.

Changes Made:

  1. DoiFetcher.java:

    • Updated performSearchById() to use BibtexParser.parseEntries() instead of singleFromString()
  2. URLDownload.java:

    • Made asString(Charset encoding, URLConnection connection) method private

Testing:

  • Code compiles successfully
  • Existing functionality preserved

Mandatory checks

Comment on lines +152 to +153
List<BibEntry> entries = new BibtexParser(preferences).parseEntries(bibtexString);
fetchedEntry = entries.isEmpty() ? Optional.empty() : Optional.of(entries.getFirst());
Copy link
Member

Choose a reason for hiding this comment

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

There is no URLconnection passed - please use org.jabref.logic.importer.fileformat.BibtexParser#parseEntries

@github-actions github-actions bot added the status: changes-required Pull requests that are not yet complete label Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status: changes-required Pull requests that are not yet complete

Projects

None yet

Development

Successfully merging this pull request may close these issues.

URLDownload should include httpResponse in exception

2 participants