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 in ExportFactory prevents JabRef from starting #3596

Closed
Siedlerchr opened this issue Jan 3, 2018 · 0 comments
Closed

NPE in ExportFactory prevents JabRef from starting #3596

Siedlerchr opened this issue Jan 3, 2018 · 0 comments
Labels
bug Confirmed bugs or reports that are very likely to be bugs export / save

Comments

@Siedlerchr
Copy link
Member

Start JabRef -> NPE
@tobiasdiez You have introduced a circular dependency
In the creation of the exportFactory the getfileExtension is called, which internally acesses Globals.exportFactory which is at that point not yet initialized

11:06:58.982 [AWT-EventQueue-0] ERROR org.jabref.FallbackExceptionHandler - Uncaught exception occurred in Thread[AWT-EventQueue-0,6,main]
java.lang.NullPointerException: null
	at org.jabref.preferences.CustomExportList.getFileExtension(CustomExportList.java:47) ~[main/:?]
	at org.jabref.preferences.CustomExportList.createFormat(CustomExportList.java:101) ~[main/:?]
	at org.jabref.preferences.CustomExportList.readPrefs(CustomExportList.java:78) ~[main/:?]
	at org.jabref.preferences.CustomExportList.getCustomExportFormats(CustomExportList.java:64) ~[main/:?]
	at org.jabref.logic.exporter.ExporterFactory.create(ExporterFactory.java:67) ~[main/:?]
	at org.jabref.JabRefMain.start(JabRefMain.java:146) ~[main/:?]
	at org.jabref.JabRefMain.lambda$0(JabRefMain.java:53) ~[main/:?]
@Siedlerchr Siedlerchr added bug Confirmed bugs or reports that are very likely to be bugs export / save labels Jan 3, 2018
Siedlerchr added a commit that referenced this issue Jan 4, 2018
#3597)

* Lookup filetypes in enum set to prevent NPE due to uninitialized exporterFactory
Fixes #3596

* Refactor list parameter to three args
Add FileType parse

* fix checkstyle
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bugs or reports that are very likely to be bugs export / save
Projects
None yet
Development

No branches or pull requests

1 participant