fix wrong closing of possible null mappings in geo point mapping

This commit is contained in:
kimchy 2011-04-22 04:29:47 +03:00
parent d517c3dfef
commit 6ed2624772
1 changed files with 12 additions and 2 deletions

View File

@ -340,8 +340,18 @@ public class GeoPointFieldMapper implements XContentMapper, ArrayValueMapperPars
} }
@Override public void close() { @Override public void close() {
latMapper.close(); if (latMapper != null) {
lonMapper.close(); latMapper.close();
}
if (lonMapper != null) {
lonMapper.close();
}
if (geohashMapper != null) {
geohashMapper.close();
}
if (geoStringMapper != null) {
geoStringMapper.close();
}
} }
@Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException { @Override public void merge(XContentMapper mergeWith, MergeContext mergeContext) throws MergeMappingException {