Skip to content

Conversation

InAnYan
Copy link
Member

@InAnYan InAnYan commented Sep 14, 2025

Closes https://github.com/JabRef/jabref-issue-melting-pot/issues/676

Steps to test

Mandatory checks

  • I own the copyright of the code submitted and I license it under the MIT license
  • [.] I manually tested my changes in running JabRef (always required)
  • [.] I added JUnit tests for changes (if applicable)
  • [.] I added screenshots in the PR description (if change is visible to the user)
  • [.] I described the change in CHANGELOG.md in a way that is understandable for the average user (if change is visible to the user)
  • [.] I checked the user 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 updating file(s) in https://github.com/JabRef/user-documentation/tree/main/en.

Comment on lines +50 to +51
try {
if (jsonInput == null || jsonInput.trim().isEmpty()) {
Copy link

Choose a reason for hiding this comment

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

The try block covers too many statements, which can make it harder to identify which specific statement caused an exception.

}
}

// Helper class for error responses
Copy link
Member

Choose a reason for hiding this comment

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

Use three slashes 😅

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

@Path("libraries/latest")
Copy link
Member

Choose a reason for hiding this comment

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

I think, this won't work...

REST works differently... a) redirect to path where this is stored -- I don't know how the client works or b) direct handling in LibraryResource.

Conflicts with @Path("libraries/{id}") at libraries

REST background: ROA -> https://en.wikipedia.org/wiki/Resource-oriented_architecture - everything is a resource, not a command endpoint (if possible)

i will dive into later

Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Well, ideal:

  1. Fetch /libraries?sort_by=date&sort_direction=desc
  2. /libraries/#{libraries[0].id}

Copy link

trag-bot bot commented Sep 14, 2025

@trag-bot didn't find any issues in the code! ✅✨

@jabref-machine
Copy link
Collaborator

Your code currently does not meet JabRef's code guidelines. We use Checkstyle to identify issues. You can see which checks are failing by locating the box "Some checks were not successful" on the pull request page. To see the test output, locate "Source Code Tests / Checkstyle (pull_request)" and click on it.

In case of issues with the import order, double check that you activated Auto Import. You can trigger fixing imports by pressing Ctrl+Alt+O to trigger Optimize Imports.

Please carefully follow the setup guide for the codestyle. Afterwards, please run checkstyle locally and fix the issues, commit, and push.

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.

4 participants