Ignore:
Timestamp:
2014-08-19T20:19:46+12:00 (10 years ago)
Author:
ak19
Message:

Fix to null pointer exception in recent commit

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/solr/trunk/src/src/java/org/greenstone/gsdl3/util/SolrQueryWrapper.java

    r29217 r29218  
    170170        while(coreIterator.hasNext() && !foundCore) {
    171171            SolrCore solrCore = coreIterator.next();
    172             if(!solrCore.getName().startsWith(this.collection_core_name_prefix)) {
    173             //logger.error("### Skipping core not of this collection: " + solrCore.getName());
    174             continue;
     172            if(this.collection_core_name_prefix != null) {
     173            if(!solrCore.getName().startsWith(this.collection_core_name_prefix)) {
     174                //logger.error("### Skipping core not of this collection: " + solrCore.getName());
     175                continue;
     176            }
     177            } else {
     178            logger.error("### Collection_core_name_prefix not set. Won't try to find terms");
     179            break;
    175180            }
    176181
Note: See TracChangeset for help on using the changeset viewer.