Skip to content

Commit cf53dcb

Browse files
committed
GH-231 - category.openSnapshot() can be called from AWT
1 parent f00f524 commit cf53dcb

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

visualvm/core/src/org/graalvm/visualvm/core/ui/actions/VisualVMDropHandler.java

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@
4545
import javax.swing.JComponent;
4646
import javax.swing.JLabel;
4747
import javax.swing.JPanel;
48-
import org.graalvm.visualvm.core.VisualVM;
4948
import org.graalvm.visualvm.core.snapshot.RegisteredSnapshotCategories;
5049
import org.graalvm.visualvm.core.snapshot.SnapshotCategory;
5150
import org.openide.DialogDisplayer;
@@ -199,12 +198,8 @@ private String openFile(final File file) {
199198

200199
for (SnapshotCategory category : categories) {
201200
if (category.getFileFilter().accept(file)) {
202-
VisualVM.getInstance().runTask(new Runnable() {
203-
public void run() {
204-
category.openSnapshot(file);
205-
LoadRecentSnapshot.instance().addFile(file);
206-
}
207-
});
201+
category.openSnapshot(file);
202+
LoadRecentSnapshot.instance().addFile(file);
208203
return null;
209204
}
210205
}

0 commit comments

Comments
 (0)