Source:
<code>public List<GeoFence> getStationaryAlerts() throws GeoLocationBasedServiceException { Registry registry = getGovernanceRegistry(); String registryPath = GeoServices.REGISTRY_PATH_FOR_ALERTS + GeoServices.ALERT_TYPE_STATIONARY + "/"; Resource resource; try { resource = registry.get(registryPath); } catch (RegistryException e) { log.error("Error while reading the registry path: " + registryPath); <START> return null; <END> } try { List<GeoFence> fences = new ArrayList<>(); if (resource != null) { Object contentObj = resource.getContent(); if (contentObj instanceof String[]) { String[] content = (String[]) contentObj; for (String res : content) { Resource childRes = registry.get(res); Properties props = childRes.getProperties(); GeoFence geoFence = new GeoFence(); InputStream inputStream = childRes.getContentStream(); StringWriter writer = new StringWriter(); IOUtils.copy(inputStream, writer, "UTF-8"); geoFence.setGeoJson(writer.toString()); List queryNameObj = (List) props.get(GeoServices.QUERY_NAME); geoFence.setQueryName(queryNameObj != null ? queryNameObj.get(0).toString() : null); List areaNameObj = (List) props.get(GeoServices.AREA_NAME); geoFence.setAreaName(areaNameObj != null ? areaNameObj.get(0).toString() : null); List sTimeObj = (List) props.get(GeoServices.STATIONARY_TIME); geoFence.setStationaryTime(sTimeObj != null ? sTimeObj.get(0).toString() : null); List fluctRadiusObj = (List) props.get(GeoServices.FLUCTUATION_RADIUS); geoFence.setFluctuationRadius(fluctRadiusObj != null ? fluctRadiusObj.get(0).toString() : null); geoFence.setCreatedTime(childRes.getCreatedTime().getTime()); fences.add(geoFence); } } } return fences; } catch (RegistryException | IOException e) { throw new GeoLocationBasedServiceException( "Error occurred while getting the geo alerts", e); } }</code><technical_language>throw GeoLocationBasedServiceException wrapping RegistryException</technical_language>

Target:
public List<GeoFence> getStationaryAlerts() throws GeoLocationBasedServiceException { Registry registry = getGovernanceRegistry(); String registryPath = GeoServices.REGISTRY_PATH_FOR_ALERTS + GeoServices.ALERT_TYPE_STATIONARY + "/"; Resource resource; try { resource = registry.get(registryPath); } catch (RegistryException e) { log.error("Error while reading the registry path: " + registryPath); return Collections.emptyList(); } try { List<GeoFence> fences = new ArrayList<>(); if (resource != null) { Object contentObj = resource.getContent(); if (contentObj instanceof String[]) { String[] content = (String[]) contentObj; for (String res : content) { Resource childRes = registry.get(res); Properties props = childRes.getProperties(); GeoFence geoFence = new GeoFence(); InputStream inputStream = childRes.getContentStream(); StringWriter writer = new StringWriter(); IOUtils.copy(inputStream, writer, "UTF-8"); geoFence.setGeoJson(writer.toString()); List queryNameObj = (List) props.get(GeoServices.QUERY_NAME); geoFence.setQueryName(queryNameObj != null ? queryNameObj.get(0).toString() : null); List areaNameObj = (List) props.get(GeoServices.AREA_NAME); geoFence.setAreaName(areaNameObj != null ? areaNameObj.get(0).toString() : null); List sTimeObj = (List) props.get(GeoServices.STATIONARY_TIME); geoFence.setStationaryTime(sTimeObj != null ? sTimeObj.get(0).toString() : null); List fluctRadiusObj = (List) props.get(GeoServices.FLUCTUATION_RADIUS); geoFence.setFluctuationRadius(fluctRadiusObj != null ? fluctRadiusObj.get(0).toString() : null); geoFence.setCreatedTime(childRes.getCreatedTime().getTime()); fences.add(geoFence); } } } return fences; } catch (RegistryException | IOException e) { throw new GeoLocationBasedServiceException( "Error occurred while getting the geo alerts", e); } }