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

NPE when exporting the database to an .sql file #778

Merged
merged 3 commits into from
Feb 10, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ to [sourceforge feature requests](https://sourceforge.net/p/jabref/features/) by
- IEEEXplore fetcher replaces keyword separator with the preferred
- Fixed [#710](https://github.com/JabRef/jabref/issues/710): Fixed quit behaviour under OSX
- Merge from DOI now honors removed fields
- Fixed [#778](https://github.com/JabRef/jabref/issues/778): Fixed NPE when exporting to .sql File


### Removed
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/net/sf/jabref/sql/exporter/DBExporter.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private void populateEntriesTable(final int database_id, List<BibEntry> entries,
* The condition below is there since PostgreSQL automatically escapes the backslashes, so the entry
* would double the number of slashes after storing/retrieving.
**/
if ("MySQL".equals(dbStrings.getServerType())) {
if ((out instanceof Connection) && "MySQL".equals(dbStrings.getServerType())) {
val = val.replace("\\", "\\\\");
val = val.replace("\"", "\\\"");
val = val.replace("\'", "''");
Expand Down