Changeset 9418


Ignore:
Timestamp:
2005-03-15T11:26:12+13:00 (19 years ago)
Author:
mdewsnip
Message:

Added check so the GLI doesn't crash when parsing a format statement for a classifier that no longer exists.

File:
1 edited

Legend:

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

    r8243 r9418  
    9090    // Immediately check if we are dealing with a classifier, by retrieving the feature name. If it is a classifier, then restore the live reference immediately before anything changes it.
    9191    Object object = getFeature();
     92
     93    // There may be format statements for no-longer-existing classifiers
     94    if (object == null) {
     95        DebugStream.println("No matching classifier for format statement!");
     96        return;
     97    }
     98
    9299    if(object instanceof Classifier) {
    93100        classifier = (Classifier) object;
Note: See TracChangeset for help on using the changeset viewer.