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 author parsing of ACM #10142

Merged
merged 4 commits into from
Aug 4, 2023
Merged

Fix author parsing of ACM #10142

merged 4 commits into from
Aug 4, 2023

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Aug 4, 2023

Fix cli debug log option

Fixes #10107
Follow up from #10137

Mandatory checks

  • 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.

Fix cli debug log option

Fixes #10107
Follow up from #10137
@Siedlerchr Siedlerchr requested a review from HoussemNasri August 4, 2023 19:11
@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Aug 4, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

Your code currently does not meet JabRef's code guidelines. The tool reviewdog already placed comments on GitHub to indicate the places. See the tab "Files" in you PR. Please carefully follow the setup guide for the codestyle. Afterwards, please run checkstyle locally and fix the issues.

More information on code quality in JabRef is available at https://devdocs.jabref.org/getting-into-the-code/development-strategy.html.

HoussemNasri
HoussemNasri previously approved these changes Aug 4, 2023
Comment on lines 226 to 244
private List<Author> getAuthors(JsonArray authors) {
List<Author> jabrefAuthors = new ArrayList<>();

for (JsonElement author : authors) {
JsonObject authorJsonObject = author.getAsJsonObject();

String given = null;
String family = null;
if (authorJsonObject.has("given")) {
given = authorJsonObject.get("given").getAsString();
}
if (authorJsonObject.has("family")) {
family = authorJsonObject.get("family").getAsString();
}
Author jabrefAuthor = new Author(given, null, null, family, null);
jabrefAuthors.add(jabrefAuthor);
}
return jabrefAuthors;
}
Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it be more comprehensible, if the return type of this method would be already AuthorList instead of List, since in the only place you use this method, you create an Authorlist of this List of Authors...?

@github-actions
Copy link
Contributor

github-actions bot commented Aug 4, 2023

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

@Siedlerchr Siedlerchr merged commit 76b0745 into main Aug 4, 2023
@Siedlerchr Siedlerchr deleted the fixACM branch August 4, 2023 22:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ACM Portal websearch bug
3 participants