Changeset 11007 for trunk/gli


Ignore:
Timestamp:
2005-12-19T13:05:45+13:00 (18 years ago)
Author:
mdewsnip
Message:

Added check for unparseable XML files when attempting to update the user's config.xml file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/Configuration.java

    r10540 r11007  
    226226    Document new_document = XMLTools.parseXMLFile(TEMPLATE_CONFIG_XML, true);
    227227    Document old_document = XMLTools.parseXMLFile(config_xml_file);
     228    if (new_document == null || old_document == null) {
     229        // Something has gone badly wrong, so we can't update the file
     230        return false;
     231    }
    228232
    229233    String new_version = new_document.getDocumentElement().getAttribute(StaticStrings.VERSION_ATTRIBUTE);
Note: See TracChangeset for help on using the changeset viewer.