if (customConfFile != null) {
try {
// see if a Tika config file can be found in the job file
URL customTikaConfig = conf.getResource(customConfFile);
if (customTikaConfig != null)
tikaConfig = new TikaConfig(customTikaConfig);
} catch (Exception e1) {
String message = "Problem loading custom Tika configuration from "
+ customConfFile;
LOG.error(message, e1);
}
} else {
try {
tikaConfig = new TikaConfig(this.getClass().getClassLoader());
} catch (Exception e2) {
String message = "Problem loading default Tika configuration";
LOG.error(message, e2);
}
}