Author: rwesten
Date: Fri Dec 6 16:23:41 2013
New Revision: 1548582
URL: http://svn.apache.org/r1548582
Log:
STANBOL-1232: fixed a bug in the parsing of FST configurations
Modified:
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
Modified:
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
URL:
http://svn.apache.org/viewvc/stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java?rev=1548582&r1=1548581&r2=1548582&view=diff
==============================================================================
---
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
(original)
+++
stanbol/trunk/entityhub/indexing/destination/solryard/src/main/java/org/apache/stanbol/entityhub/indexing/destination/solryard/SolrYardIndexingDestination.java
Fri Dec 6 16:23:41 2013
@@ -547,9 +547,7 @@ public class SolrYardIndexingDestination
* @param lines the single FST configurations
*/
public void setFstConfig(Collection<String> lines) {
- List<FstConfig> fstConfigs = new ArrayList<FstConfig>();
- parseFstConfig(lines);
- this.fstConfigs = Collections.unmodifiableList(fstConfigs);
+ this.fstConfigs = Collections.unmodifiableList(parseFstConfig(lines));
}
/**
* Getter for the FST models that are created in the {@link #finalise()}
@@ -562,7 +560,8 @@ public class SolrYardIndexingDestination
/**
* @param lines
*/
- private void parseFstConfig(Collection<String> lines) {
+ private List<FstConfig> parseFstConfig(Collection<String> lines) {
+ List<FstConfig> fstConfigs = new ArrayList<FstConfig>();
for(String line : lines){
line = line.trim();
if(!line.isEmpty() && line.charAt(0) != '#'){
@@ -586,6 +585,7 @@ public class SolrYardIndexingDestination
fstConfigs.add(new FstConfig(fields[0], fields[1]));
}
}
+ return fstConfigs;
}
/**
* Creates a {@link SolrYardConfig} and initialised it to used single Yard