Changeset 29218

Show
Ignore:
Timestamp:
19.08.2014 20:19:46 (5 years ago)
Author:
ak19
Message:

Fix to null pointer exception in recent commit

Files:
1 modified

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