Changeset 31344

Show
Ignore:
Timestamp:
24.01.2017 03:49:38 (3 years ago)
Author:
litvinovg
Message:

Update to previous commit

Files:
1 modified

Legend:

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

    r31343 r31344  
    3030import org.greenstone.gsdl3.util.UserContext; 
    3131import org.greenstone.gsdl3.util.XMLConverter; 
    32  
    3332import org.w3c.dom.Document; 
    3433import org.w3c.dom.Element; 
     
    505504    private String[] mergeGroups(UserContext userContext, Element paramList, String[] collArray){ 
    506505        Document doc = XMLConverter.newDOM(); 
    507          
     506        boolean allSelected = false; 
    508507        Element groupParamList = extractGroupParams(paramList, collArray, doc);      
    509          
    510508        Element collParam = GSXML.getNamedElement(paramList, GSXML.PARAM_ELEM, GSXML.NAME_ATT, COLLECTION_PARAM); 
    511         boolean allSelected = GSXML.getValue(collParam).matches(".*\\ball\\b.*"); 
     509        if (collParam != null) { 
     510            String collValue = GSXML.getValue(collParam); 
     511            if (collValue != null) { 
     512                allSelected = collValue.matches(".*\\ball\\b.*"); 
     513            } 
     514        } 
    512515        //Group param not empty and coll param null or not 'all' 
    513516        if ( allSelected || !groupParamList.hasChildNodes())