Support files with no extension in config mappings
This commit is contained in:
parent
a63aa6cc18
commit
0a5a068269
|
@ -415,7 +415,8 @@ public class MetaDataCreateIndexService extends AbstractComponent {
|
|||
if (mappingFile.isHidden()) {
|
||||
continue;
|
||||
}
|
||||
String mappingType = mappingFile.getName().substring(0, mappingFile.getName().lastIndexOf('.'));
|
||||
int lastDotIndex = mappingFile.getName().lastIndexOf('.');
|
||||
String mappingType = lastDotIndex != -1 ? mappingFile.getName().substring(0, lastDotIndex) : mappingFile.getName();
|
||||
try {
|
||||
String mappingSource = Streams.copyToString(new FileReader(mappingFile));
|
||||
if (mappings.containsKey(mappingType)) {
|
||||
|
|
Loading…
Reference in New Issue