Fix exporting via commandline in no gui mode#2316
Conversation
Fix for #2273 Adjusted javadoc
tobiasdiez
left a comment
There was a problem hiding this comment.
In general LGTM, just a few questions/remarks from my side.
| - We fixed an issue when JabRef restores its session and a shared database was used: The error message "No suitable driver found" will not appear. | ||
| - Update check now correctly notifies about new release if development version is used. [#2298](https://github.com/JabRef/jabref/issues/2298) | ||
| - Fixed [#2311](https://github.com/JabRef/jabref/issues/2311): The DBLP fetcher has been rewritten and is working again. | ||
| - Fixed [#2273](https://github.com/JabRef/jabref/issues/2273): Export via commandline in no-gui modus is now working again. |
| } catch (Exception ex) { | ||
| System.err.println(Localization.lang("Could not export file") + " '" + data[1] + "': " | ||
| + ex.getMessage()); | ||
| + ExceptionUtils.getStackTrace(ex)); |
There was a problem hiding this comment.
Did you changed this on purpose? All the other error reporting in this class seems to display the message instead of the stack trace (not sure what is better, but it should be consistent).
There was a problem hiding this comment.
Yes, because if you look into the issue, ex.getMessage simply returned "null" and there was no stacktrace visible, which made it hard to locate the bug.
Could not export file 'references.html': null
There was a problem hiding this comment.
I looked at all other cases and there is either a logger attached or a specific Exception, e.g. a SaveException/JabRef Exception catched and the message printed, which is fine enough.
Only this two line were problematic, as the getMessage returned null
| final Charset encoding, List<BibEntry> entries) throws Exception { | ||
| Objects.requireNonNull(databaseContext); | ||
| Objects.requireNonNull(entries); | ||
| Objects.requireNonNull(databaseContext, "Database Context must not be null!"); |
There was a problem hiding this comment.
To be honest, in my opinion these string messages don't add more relevant information.
* upstream/master: Cleanup EMACS code (#2317) Update mockito-core from 2.2.15 to 2.2.21 Fix typo in comment
Remove string messages from requireNonNull
|
Included feedback |
* upstream/master: Ignore failing test Replace usage of Threads and priorities with thread pool (#2304) Class variable declarations and method declarations are now separated by one line Disable joining of wrapped lines Installer Code Signing #1879 (#2320) Add bibtex key deviation check (#2328) Update mockito-core (2.2.21 -> 2.2.26) and wiremock (2.3.1 -> 2.4.1) Fix opening of preference dialog with Java 9 (#2329) Add longer explanation for ID-based entry generation. (#2330) Add DOI integrity check (#2327) New strings translated (#2325) Fix exporting via commandline in no gui mode (#2316) Cleanup EMACS code (#2317) Update mockito-core from 2.2.15 to 2.2.21 Fix typo in comment Updated JabRef_tr.properties (#2315) # Conflicts: # CHANGELOG.md
Fix for #2273
Adjusted javadoc