Revision: 4655 http://sourceforge.net/p/jump-pilot/code/4655 Author: edso Date: 2015-12-21 21:19:20 +0000 (Mon, 21 Dec 2015) Log Message: ----------- bugfix AddDatastoreLayerPanel kept the list of datasets of the previous datastore in case the new threw an error, fixed that
Modified Paths: -------------- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/datastore/AddDatastoreLayerPanel.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/datastore/AddDatastoreLayerPanel.java =================================================================== --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/datastore/AddDatastoreLayerPanel.java 2015-12-21 10:16:09 UTC (rev 4654) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/datastore/AddDatastoreLayerPanel.java 2015-12-21 21:19:20 UTC (rev 4655) @@ -209,15 +209,23 @@ if (getConnectionDescriptor() == null) { return; } + + // reset the list first, in case the request doesn't return any (eg. in case of error) + LinkedHashMap<String, ArrayList<DataStoreLayer>> root = new LinkedHashMap<String, ArrayList<DataStoreLayer>>(); + datasetTreeModel = new DataStoreLayerTreeModel(root); + + Throwable t = null; try { //loads list of layers from the given connection and builds the datasetTreeModel object for these layers loadDatasetList(getConnectionDescriptor()); } catch (ThreadDeath td) { - //TODO: - throw td; + t = td; } catch (Exception e) { - getContext().getErrorHandler().handleThrowable(e); + t = e; } finally { + if (t != null){ + getContext().getErrorHandler().handleThrowable(t); + } //datasetTreeModel = new DataStoreLayerTreeModel(root); datasetOutlineModel = DefaultOutlineModel.createOutlineModel( datasetTreeModel, new DataStoreLayerRowModel(), true, ------------------------------------------------------------------------------ _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel