Skip to content

Commit ad58de2

Browse files
committed
wip
1 parent d3a5f1c commit ad58de2

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

core/store/pom.xml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,13 @@
5555
<groupId>com.fasterxml.jackson.core</groupId>
5656
<artifactId>jackson-databind</artifactId>
5757
</dependency>
58+
<dependency>
59+
<groupId>com.github.spotbugs</groupId>
60+
<artifactId>spotbugs-annotations</artifactId>
61+
<version>4.7.3</version>
62+
<scope>provided</scope>
63+
</dependency>
64+
5865
</dependencies>
5966
<build>
6067
<plugins>

core/store/src/main/java/org/locationtech/geowave/core/store/cli/store/DataStorePluginOptions.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@
2626
import com.beust.jcommander.ParameterException;
2727
import com.beust.jcommander.ParametersDelegate;
2828

29+
30+
2931
/**
3032
* Class is used to facilitate loading of a DataStore from options specified on the command line.
3133
*/
@@ -49,13 +51,17 @@ public DataStorePluginOptions() {}
4951
*
5052
* @param options
5153
*/
54+
5255
public DataStorePluginOptions(final Map<String, String> options) throws IllegalArgumentException {
53-
factoryPlugin = GeoWaveStoreFinder.findStoreFamily(options);
54-
if (factoryPlugin == null) {
56+
final StoreFactoryFamilySpi localFactoryPlugin = GeoWaveStoreFinder.findStoreFamily(options);
57+
if (localFactoryPlugin == null) {
5558
throw new IllegalArgumentException("Cannot find store plugin factory");
5659
}
57-
factoryOptions = factoryPlugin.getDataStoreFactory().createOptionsInstance();
58-
ConfigUtils.populateOptionsFromList(getFactoryOptions(), options);
60+
final StoreFactoryOptions localFactoryOptions =
61+
localFactoryPlugin.getDataStoreFactory().createOptionsInstance();
62+
ConfigUtils.populateOptionsFromList(localFactoryOptions, options);
63+
this.factoryPlugin = localFactoryPlugin;
64+
this.factoryOptions = localFactoryOptions;
5965
}
6066

6167
public DataStorePluginOptions(final StoreFactoryOptions factoryOptions) {

0 commit comments

Comments
 (0)