Skip to content

Fix for #12004issue:Rewrite handleStringData to use CompositeIdFetcher#12009

Merged
koppor merged 5 commits into
JabRef:mainfrom
Red12138-java:fix-for-issue-12004
Oct 17, 2024
Merged

Fix for #12004issue:Rewrite handleStringData to use CompositeIdFetcher#12009
koppor merged 5 commits into
JabRef:mainfrom
Red12138-java:fix-for-issue-12004

Conversation

@Red12138-java

@Red12138-java Red12138-java commented Oct 17, 2024

Copy link
Copy Markdown
Contributor

Refactor the handleStringData method as requirements and add a no-args constructor to CompositeFetcher.java, the reason to add no-args constructor is that performSearchById is not a static method which could not be used directly.

"Closes #12004".

Mandatory checks

  • I own the copyright of the code submitted and I licence it under the MIT license
  • 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.

}

public CompositeIdFetcher() {
importFormatPreferences = null;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, you need to pass the preferences. - You have it availble in line 101 in ImportHandler. Store it in a class variable and use the class variable in line 367 of ImportHandler.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oh, sorry. I see. I have deleted the constructor. I will create a pull request again. Thank you so much.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No additional pull request. Just push. As your teammate already did!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Okkk!thank you

@koppor koppor left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested. Works. Thank you for the PR.

Since this was really a quick-win, maybe you can tackle another issue? Now you can be more relaxed and really take this as opportunity to level-up your code reading and code writing skills.

We offer a curated list of issues at https://github.com/orgs/JabRef/projects/3/views/3.

@koppor koppor added this pull request to the merge queue Oct 17, 2024
Merged via the queue into JabRef:main with commit 2c44ee1 Oct 17, 2024
trickypr added a commit to trickypr/jabref that referenced this pull request Oct 19, 2024
JabRef#12009 started using CompositeIdFetcher for fetching logic. This removes the dead code functions in ImportHandler
github-merge-queue Bot pushed a commit that referenced this pull request Oct 20, 2024
* feat: add ssrn urls to CompositeIdFetcher

* refactor: delete now-dead functions in ImportHandler

#12009 started using CompositeIdFetcher for fetching logic. This removes the dead code functions in ImportHandler

* docs: add ssrn import to changelog

* style: conform to stylecheck

* style: address requested changes

* docs: correct DOI capitalisation

---------

Co-authored-by: Oliver Kopp <kopp.dev@gmail.com>
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.

Rewrite handleStringData to use CompositeIdFetcher

3 participants