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,9 +340,19 @@ public class GeoPointFieldMapper implements XContentMapper, ArrayValueMapperPars
} }
@Override public void close() { @Override public void close() {
if (latMapper != null) {
latMapper.close(); latMapper.close();
}
if (lonMapper != null) {
lonMapper.close(); 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 {
// TODO // TODO