Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixed a schema parsing for dependencies

  • Loading branch information...
commit 41ea25f8409c014f77fd14a2df06db2358066f84 1 parent 3d1f8cb
@javasoze authored
View
15 sensei-core/src/main/java/com/senseidb/conf/SenseiFacetHandlerBuilder.java
@@ -341,14 +341,13 @@ public static SenseiSystemInfo buildFacets(JSONObject schemaObj, SenseiPluginReg
String type = facet.getString("type");
String fieldName = facet.optString("column",name);
Set<String> dependSet = new HashSet<String>();
- String depends= facet.optString("depends",null);
- if (depends != null) {
- for (String dep :depends.split("[,; ]")) {
- dep = dep.trim();
- if (!dep.equals("")) {
- dependSet.add(dep);
- }
- }
+ JSONArray dependsArray = facet.optJSONArray("depends");
+
+ if (dependsArray != null) {
+ int depCount = dependsArray.length();
+ for (int k=0;k<depCount;++k){
+ dependSet.add(dependsArray.getString(k));
+ }
}
SenseiSystemInfo.SenseiFacetInfo facetInfo = new SenseiSystemInfo.SenseiFacetInfo(name);
Please sign in to comment.
Something went wrong with that request. Please try again.