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

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

Merged
merged 5 commits into from
Oct 17, 2024

Conversation

Red12138-java
Copy link
Contributor

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

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.

@@ -19,6 +19,10 @@ public CompositeIdFetcher(ImportFormatPreferences importFormatPreferences) {
this.importFormatPreferences = importFormatPreferences;
}

public CompositeIdFetcher() {
importFormatPreferences = null;
Copy link
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
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
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
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

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.

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
22 of 23 checks passed
ExrosZ pushed a commit to ExrosZ/jabref that referenced this pull request Oct 17, 2024
JabRef#12009)

* Rewrite handleStringData to use CompositeIdFetcher JabRef#12004
add a no-args constructor to CompositeIdFetcher.java

* delete the no-args constructor.

---------

Co-authored-by: u7744550 <[email protected]>
ExrosZ pushed a commit to ExrosZ/jabref that referenced this pull request Oct 17, 2024
JabRef#12009)

* Rewrite handleStringData to use CompositeIdFetcher JabRef#12004
add a no-args constructor to CompositeIdFetcher.java

* delete the no-args constructor.

---------

Co-authored-by: u7744550 <[email protected]>
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 <[email protected]>
ExrosZ pushed a commit to ExrosZ/jabref that referenced this pull request Oct 21, 2024
JabRef#12009)

* Rewrite handleStringData to use CompositeIdFetcher JabRef#12004
add a no-args constructor to CompositeIdFetcher.java

* delete the no-args constructor.

---------

Co-authored-by: u7744550 <[email protected]>
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