Changeset 27717 for main/trunk


Ignore:
Timestamp:
2013-06-27T16:58:25+12:00 (11 years ago)
Author:
sjm84
Message:

A minor error check

File:
1 edited

Legend:

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

    r27137 r27717  
    1919package org.greenstone.gsdl3.service;
    2020
    21 import org.greenstone.gsdl3.util.*;
    22 import org.greenstone.gsdl3.build.*;
    23 import org.greenstone.util.GlobalProperties;
    24 
    25 import org.w3c.dom.Document;
    26 import org.w3c.dom.Node;
    27 import org.w3c.dom.Text;
    28 import org.w3c.dom.Element;
    29 import org.w3c.dom.NodeList;
    30 
    31 import java.util.Collections;
    32 import java.util.HashMap;
    33 import java.util.Map;
    34 import java.util.List;
    35 import java.util.ArrayList;
    3621import java.io.BufferedWriter;
    3722import java.io.File;
    3823import java.io.FileWriter;
    3924import java.io.Serializable;
    40 import java.lang.Thread.State;
    41 import java.util.Locale;
    42 
    43 import java.util.Timer;
    44 import java.util.TimerTask;
    45 
    46 import org.apache.log4j.*;
     25import java.util.Collections;
     26import java.util.HashMap;
     27import java.util.Map;
     28
     29import org.apache.log4j.Logger;
     30import org.greenstone.gsdl3.build.GS2PerlConstructor;
     31import org.greenstone.gsdl3.build.GS2PerlListener;
     32import org.greenstone.gsdl3.util.GSFile;
     33import org.greenstone.gsdl3.util.GSParams;
     34import org.greenstone.gsdl3.util.GSPath;
     35import org.greenstone.gsdl3.util.GSStatus;
     36import org.greenstone.gsdl3.util.GSXML;
     37import org.greenstone.gsdl3.util.UserContext;
     38import org.w3c.dom.Element;
     39import org.w3c.dom.Node;
     40import org.w3c.dom.Text;
    4741
    4842/**
     
    8478    // set of listeners for any construction commands
    8579    protected Map<String, GS2PerlListener> listeners = null;
    86     protected HashMap<String, Boolean> collectionOperationMap = new HashMap<String, Boolean>(); 
     80    protected HashMap<String, Boolean> collectionOperationMap = new HashMap<String, Boolean>();
    8781
    8882    public GS2Construct()
     
    201195        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    202196        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
     197
     198        if (params == null)
     199        {
     200            return null;
     201        }
    203202
    204203        //If we have been requested to only build certain documents then we need to create a manifest file
     
    760759        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    761760        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    762        
    763         String collection = (String)params.get(COL_PARAM);
     761
     762        String collection = (String) params.get(COL_PARAM);
    764763
    765764        if (checkCollectionIsNotBusy(collection))
     
    785784        Element param_list = (Element) GSXML.getChildByTagName(request, GSXML.PARAM_ELEM + GSXML.LIST_MODIFIER);
    786785        HashMap<String, Serializable> params = GSXML.extractParams(param_list, false);
    787        
    788         String collection = (String)params.get(COL_PARAM);
     786
     787        String collection = (String) params.get(COL_PARAM);
    789788
    790789        collectionOperationMap.remove(collection);
Note: See TracChangeset for help on using the changeset viewer.