viatra / EMF-IncQuery

This repository is only kept for historic reasons. All development happens on eclipse.org
http://eclipse.org/viatra
13 stars 4 forks source link

ensure QueryExplorer.getInstance() is only used inside display thread or checked for null #288

Closed abelhegedus closed 12 years ago

abelhegedus commented 12 years ago

The Query Explorer code is full of lines similar to the following:

QueryExplorer.getInstance().someMethod()

As the getInstance() contains access to the workbench, it only returns a non-null value if invoked from a display thread, so anytime the code is invoked from a non-display thread, it will throw an NPE.

Possible solutions:

abelhegedus commented 12 years ago

Thanks for going through the occurences, I'm closing the ticket. Anybody with additional requests can reopen it on will.