Ignore:
Timestamp:
2017-04-07T17:47:14+12:00 (7 years ago)
Author:
ak19
Message:
  1. SafeProcess.CustomProcessHandler replaces SafeProcess.LineByLineHandler to allow GS developers more control over the handling of a Process' iostreams and more transparency to the developer about what happens. But SafeProcess provides default behaviours. 2. Some informative msgs in the GS2Construct method that marks the flat DB for when the oid entry does not occur in the DB.
File:
1 edited

Legend:

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

    r31546 r31591  
    11871187        // now we know we have an archives folder
    11881188        String old_value = coll_db.getValue(oid);
    1189         String new_value = old_value.replace("<index-status>B", "<index-status>" + mark);
     1189        String new_value = "<index-status>" + mark;
     1190        if(old_value == null) {
     1191            logger.error("### null old_value in flat DB for oid " + oid);
     1192        } else {
     1193            new_value = old_value.replace("<index-status>B", "<index-status>" + mark);
     1194            logger.info("### Replacing db entry for oid " + oid + " which has old_value " + old_value);
     1195            logger.info("### with new value " + new_value);
     1196                   
     1197        }
    11901198        // Close database for reading
    11911199        coll_db.closeDatabase();
     1200
    11921201        if (!coll_db.openDatabase(coll_db_file, SimpleCollectionDatabase.WRITE))
    1193         {
     1202            {
    11941203            logger.error("Could not open collection archives database. Somebody already using this database!");
    11951204            return;
    1196         }
     1205            }
     1206       
    11971207        coll_db.setValue(oid, new_value);
    1198         coll_db.closeDatabase();
    11991208       
     1209        coll_db.closeDatabase();       
    12001210    }
    12011211}
Note: See TracChangeset for help on using the changeset viewer.