Revision: 4893 http://sourceforge.net/p/jump-pilot/code/4893 Author: michaudm Date: 2016-04-11 14:10:44 +0000 (Mon, 11 Apr 2016) Log Message: ----------- Fix NPE in SaveTo Writable PostGISDataSouce
Modified Paths: -------------- core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISDataStoreDataSource.java core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISSaveDataSourceQueryChooser.java Modified: core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISDataStoreDataSource.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISDataStoreDataSource.java 2016-04-11 09:27:42 UTC (rev 4892) +++ core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISDataStoreDataSource.java 2016-04-11 14:10:44 UTC (rev 4893) @@ -33,6 +33,10 @@ // Called by Java2XML [Jon Aquino 2005-03-16] } + public PostGISDataStoreDataSource(WorkbenchContext context) { + this.context = context; + } + public PostGISDataStoreDataSource( ConnectionDescriptor connectionDescriptor, String datasetName, Modified: core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISSaveDataSourceQueryChooser.java =================================================================== --- core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISSaveDataSourceQueryChooser.java 2016-04-11 09:27:42 UTC (rev 4892) +++ core/trunk/src/org/openjump/core/ui/plugin/datastore/postgis2/PostGISSaveDataSourceQueryChooser.java 2016-04-11 14:10:44 UTC (rev 4893) @@ -63,7 +63,7 @@ // It is very important to create a new PostGISDataStoreDataSource here, // otherwise, all layers saved as PostGIS table use the same PostGISDataStoreDataSource SaveToPostGISDataSourceQuery query = new SaveToPostGISDataSourceQuery( - new PostGISDataStoreDataSource(), + new PostGISDataStoreDataSource(context.getWorkbenchContext()), updateQuery, (String)properties.get(WritableDataStoreDataSource.DATASET_NAME_KEY) ); ------------------------------------------------------------------------------ Find and fix application performance issues faster with Applications Manager Applications Manager provides deep performance insights into multiple tiers of your business applications. It resolves application problems quickly and reduces your MTTR. Get your free trial! http://pubads.g.doubleclick.net/ gampad/clk?id=1444514301&iu=/ca-pub-7940484522588532 _______________________________________________ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel