SOLR-841 -- DataImportHandler should throw exception if a field does not have column attribute

git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@725635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2008-12-11 09:39:31 +00:00
parent cf0a31f1f7
commit 714d1c7ad7
2 changed files with 6 additions and 0 deletions

View File

@ -73,6 +73,9 @@ Bug Fixes
10. SOLR-888: DateFormatTransformer cannot convert non-string type
(Amit Nithian via shalin)
11. SOLR-841: DataImportHandler should throw exception if a field does not have column attribute
(Michael Henson, shalin)
Documentation
----------------------

View File

@ -205,6 +205,9 @@ public class DataConfig {
public Field(Element e) {
this.name = getStringAttribute(e, DataImporter.NAME, null);
this.column = getStringAttribute(e, DataImporter.COLUMN, null);
if (column == null) {
throw new DataImportHandlerException(DataImportHandlerException.SEVERE, "Field must have a column attribute");
}
this.boost = Float.parseFloat(getStringAttribute(e, "boost", "1.0f"));
allAttributes.putAll(getAllAttributes(e));
}