Project

General

Profile

« Previous | Next » 

Revision 42110

trying to avoid heavy xqueries

View differences:

ISLookUpServiceImpl.java
238 238
		if (resourceType == null || resourceType.isEmpty()) { throw new ISLookUpException("Invalid resourceType"); }
239 239

  
240 240
		try {
241
			return isStore.getXML(resourceType, xqueryUtils.getRootCollection() + ResourceType.RESOURCE_TYPES);
241
			final String resource = isStore.getXML(resourceType, xqueryUtils.getRootCollection() + ResourceType.RESOURCE_TYPES);
242
			if (resource == null || resource.isEmpty()) { throw new ISLookUpDocumentNotFoundException(PROFILE_NOT_FOUND); }
243
			return resource;
242 244
		} catch (final ISStoreException e) {
243 245
			throw new ISLookUpException(e);
244 246
		}

Also available in: Unified diff