refine-jabsrv#13044
Conversation
|
|
||
| private java.nio.file.Path getLibraryPath(String id) { | ||
| return preferences.getLastFilesOpenedPreferences().getLastFilesOpened() | ||
| return filesToServe.getFilesToServe() |
There was a problem hiding this comment.
The method getLibraryPath uses a filter to find a file path, but it throws a NotFoundException if no match is found. This is using exceptions for control flow, which is not recommended.
|
|
||
| exports org.jabref.http.dto to com.google.gson, org.glassfish.hk2.locator; | ||
|
|
||
| opens org.jabref.http.server to org.glassfish.hk2.utilities, org.glassfish.hk2.locator; |
There was a problem hiding this comment.
The 'opens' directive is reformatted without adding new statements. Reformatting should only occur with new statements to avoid unnecessary changes.
|
|
||
| import org.jabref.logic.util.io.BackupFileUtil; | ||
|
|
||
| /// Holds information about test .bib files |
There was a problem hiding this comment.
The comment uses three slashes which is not standard JavaDoc format. JavaDoc should be used for method and class comments to provide a high-level summary.
|
|
||
| /// Holds information about test .bib files | ||
| /// | ||
| /// We cannot use a string constant as the path changes from OS to OS. Therefore, we need to dynamically create the expected result. |
There was a problem hiding this comment.
The comment is trivial and restates the obvious from the code. Comments should provide new information or reasoning not plainly derived from the code.
|
"automerge" as this is kind of a "hot fix" (a student group is relying in a working http server) |
| SLF4JBridgeHandler.install(); | ||
|
|
||
| final List<Path> lastFilesOpened = new ArrayList<>(); // JabRefCliPreferences.getInstance().getGuiPreferences().getLastFilesOpened(); | ||
| final List<Path> filesToServe = JabRefCliPreferences.getInstance().getLastFilesOpenedPreferences().getLastFilesOpened().stream().collect(Collectors.toCollection(ArrayList::new)); |
There was a problem hiding this comment.
The use of Collectors.toCollection(ArrayList::new) is unnecessary. The Stream API provides a simpler toList() method that should be used for better readability and maintainability.
|
The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build. |
* upstream/main: Fix directory path validation checks (#13029) Keep merge=union for JabRef_en.properties Merging Entry Creation Buttons Into a Single Tool (#13020) refine-jabsrv (#13044) Switch if branches for readbility (#13042) Updating the gradle wrapper does not need any JDK (#13037) Fix path - and fix typo (#13038)
Fixes
jabsrvChocolate.bibrest-api.http"running" without SSLFuture work: Get SSL working again
Mandatory checks
CHANGELOG.mddescribed in a way that is understandable for the average user (if change is visible to the user)