Merge pull request #7079 from kellykelly3/7758-CVT-NPE

7758 Fixed CVT NPE issue
This commit is contained in:
Richard Cordovano 2021-06-29 11:13:52 -04:00 committed by GitHub
commit d373f4cd47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,7 +1,7 @@
/* /*
* Autopsy Forensic Browser * Autopsy Forensic Browser
* *
* Copyright 2017-2018 Basis Technology Corp. * Copyright 2017-2021 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org * Contact: carrier <at> sleuthkit <dot> org
* *
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
@ -70,7 +70,6 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future; import java.util.concurrent.Future;
import java.util.function.BiConsumer; import java.util.function.BiConsumer;
import java.util.logging.Level; import java.util.logging.Level;
@ -583,30 +582,14 @@ final public class VisualizationPanel extends JPanel {
ModalDialogProgressIndicator progressIndicator = new ModalDialogProgressIndicator(windowAncestor, Bundle.VisualizationPanel_computingLayout()); ModalDialogProgressIndicator progressIndicator = new ModalDialogProgressIndicator(windowAncestor, Bundle.VisualizationPanel_computingLayout());
progressIndicator.start(Bundle.VisualizationPanel_computingLayout()); progressIndicator.start(Bundle.VisualizationPanel_computingLayout());
graph.getModel().beginUpdate();
new SwingWorker<Void, Void>() { try {
@Override layout.execute(graph.getDefaultParent());
protected Void doInBackground() { fitGraph();
graph.getModel().beginUpdate(); } finally {
try { graph.getModel().endUpdate();
layout.execute(graph.getDefaultParent()); progressIndicator.finish();
fitGraph(); }
} finally {
graph.getModel().endUpdate();
progressIndicator.finish();
}
return null;
}
@Override
protected void done() {
try {
get();
} catch (InterruptedException | ExecutionException ex) {
logger.log(Level.WARNING, "CVT graph layout failed.", ex);
}
}
}.execute();
} }
private void clearVizButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_clearVizButtonActionPerformed private void clearVizButtonActionPerformed(ActionEvent evt) {//GEN-FIRST:event_clearVizButtonActionPerformed