Ignore:
Timestamp:
2010-09-28T10:21:36+13:00 (14 years ago)
Author:
davidb
Message:

Code used to test 'coll_db == null' to determine if a database was opened correctly. Since this value is returned by a constructor, it is always non-null, even when it failed to open the database. The routine databaseOK() was added to core class, and is now used in these routines instead of testing for null

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/CoverageMetadataRetrieve.java

    r22457 r22974  
    9292    }
    9393    coll_db = new SimpleCollectionDatabase(database_type);
    94     if (coll_db == null) {
     94    if (!coll_db.databaseOK()) {
    9595      logger.error("Couldn't create the collection database of type "+database_type);
    9696      return false;
     
    190190    protected Element processCoverageMetadataRetrieve(Element request) {
    191191
     192   
     193    if (!this.coll_db.databaseOK()) {
     194    logger.error("No valid database found\n");
     195    return null;
     196    }
     197
    192198    DBInfo collection_info = this.coll_db.getInfo("collection");
    193199   
Note: See TracChangeset for help on using the changeset viewer.