DSpaceObject dso = HandleManager.resolveToObject(context, handle); if (! enabled || dso == null || (dso.getType() != Constants.COLLECTION && dso.getType() != Constants.COMMUNITY) )
DSpaceObject dso = null;    if(!handle.equals(SITE_FEED_KEY)) {  dso = HandleManager.resolveToObject(context, handle); }  if (! enabled || (dso != null && (dso.getType() != Constants.COLLECTION && dso.getType() != Constants.COMMUNITY)) )
    protected void doDSGet(Context context, HttpServletRequest request,            HttpServletResponse response) throws ServletException, IOException,            SQLException, AuthorizeException	{        String path = request.getPathInfo();        String feedType = null;        String handle = null;        if(labels==null)        {                // Get access to the localized resource bundle            Locale locale = request.getLocale();            labels = ResourceBundle.getBundle("Messages", locale);        }                if (path != null)        {            // substring(1) is to remove initial '/'            path = path.substring(1);            int split = path.indexOf("/");            if (split != -1)            {            	feedType = path.substring(0,split);            	handle = path.substring(split+1);            }        }        // Determine if handle is a valid reference        DSpaceObject dso = HandleManager.resolveToObject(context, handle);        if (! enabled || dso == null ||         	(dso.getType() != Constants.COLLECTION && dso.getType() != Constants.COMMUNITY) )        {            log.info(LogManager.getHeader(context, "invalid_id", "path=" + path));            JSPManager.showInvalidIDError(request, response, path, -1);            return;        }                // Determine if requested format is supported        if( feedType == null || ! formats.contains( feedType ) )        {            log.info(LogManager.getHeader(context, "invalid_syndformat", "path=" + path));            JSPManager.showInvalidIDError(request, response, path, -1);            return;        }                // Lookup or generate the feed        Channel channel = null;        if (feedCache != null)        {            // Cache key is handle        	CacheFeed cFeed = (CacheFeed)feedCache.get(handle);        	if (cFeed != null)  // cache hit, but...        	{        		// Is the feed current?        		boolean cacheFeedCurrent = false;        		if (cFeed.timeStamp + (cacheAge * HOUR_MSECS) < System.currentTimeMillis())        		{        			cacheFeedCurrent = true;        		}        		// Not current, but have any items changed since feed was created/last checked?        		else if ( ! itemsChanged(context, dso, cFeed.timeStamp))        		{        			// no items have changed, re-stamp feed and use it          			cFeed.timeStamp = System.currentTimeMillis();          			cacheFeedCurrent = true;        		}        		if (cacheFeedCurrent)        		{        			channel = cFeed.access();		        		}        	}        }                // either not caching, not found in cache, or feed in cache not current        if (channel == null)        {        	channel = generateFeed(context, dso);        	if (feedCache != null)        	{        		cache(handle, new CacheFeed(channel));        	}        }                // set the feed to the requested type & return it        channel.setFeedType(feedType);        WireFeedOutput feedWriter = new WireFeedOutput();        try        {        	response.setContentType("text/xml; charset=UTF-8");        	feedWriter.output(channel, response.getWriter());        }        catch( FeedException fex )        {        	throw new IOException(fex.getMessage());        }    }