Changeset 29265

Show
Ignore:
Timestamp:
11.09.2014 12:53:17 (5 years ago)
Author:
kjdon
Message:

check for null coll_config_xml before trying to modify it for debug, otherwise get null pointer exception. this will happen if you have a folder in collect which is not actually a collection

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/collection/OAICollection.java

    r29064 r29265  
    8484 
    8585        Element coll_config_xml = loadCollConfigFile(); 
     86        if (coll_config_xml == null) { 
     87          logger.error("Collection: couldn't configure collection: " + this.cluster_name + ", " + "Couldn't load collection config file"); 
     88 
     89          return false; 
     90        } 
     91        Element build_config_xml = loadBuildConfigFile(); 
     92        if (build_config_xml == null) 
     93        { 
     94          logger.error("Collection: couldn't configure collection: " + this.cluster_name + ", " + "Couldn't load build config file"); 
     95 
     96          return false; 
     97        } 
    8698        GSXSLT.modifyCollectionConfigForDebug(coll_config_xml); 
    87         Element build_config_xml = loadBuildConfigFile(); 
    88  
    89         if (coll_config_xml == null || build_config_xml == null) 
    90         { 
    91             return false; 
    92         } 
    9399 
    94100        // process the metadata and display items and default library params