Skip to content

Commit

Permalink
Fixed NPE in LinuxMachine, because of change from heritrix to heritrix3
Browse files Browse the repository at this point in the history
  • Loading branch information
svcarlsen committed Dec 17, 2015
1 parent 579fdb2 commit cb476d2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
Expand Up @@ -219,6 +219,11 @@ public final class Constants {
/** Path to the branch with the Heritrix settings. */
static final String[] SETTINGS_HERITRIX_BRANCH = HarvesterSettings.HERITRIX.replace(
COMPLETE_SETTINGS_BRANCH + ".", "").split("[.]");

/** Path to the branch with the Heritrix3 settings. */
static final String[] SETTINGS_HERITRIX3_BRANCH = HarvesterSettings.HERITRIX3.replace(
COMPLETE_SETTINGS_BRANCH + ".", "").split("[.]");

/** The path to the jmxUsername under heritrix from settings. */
static final String[] SETTINGS_HERITRIX_JMX_USERNAME_LEAF = HarvesterSettings.HERITRIX_JMX_USERNAME.replace(
COMPLETE_SETTINGS_BRANCH + ".", "").split("[.]");
Expand Down
Expand Up @@ -121,7 +121,7 @@ public LinuxMachine(Element subTreeRoot, XmlStructure parentSettings, Parameters
Element heritrixBundleElement =
appSettings.getSubChild(Constants.SETTINGS_HARVEST_HERITRIX3_BUNDLE_LEAF);
if (heritrixBundleElement == null) {
appSettings.getSubChild(Constants.SETTINGS_HERITRIX_BRANCH).addElement("bundle");
appSettings.getSubChild(Constants.SETTINGS_HERITRIX3_BRANCH).addElement("bundle");
heritrixBundleElement =
appSettings.getSubChild(Constants.SETTINGS_HARVEST_HERITRIX3_BUNDLE_LEAF);
heritrixBundleElement.setText((String)bundles.values().toArray()[0]);
Expand Down

0 comments on commit cb476d2

Please sign in to comment.