@Test public void testExtractResultIdNullInput() throws Exception { String objectId = null; String extractedResultId = ObjectStoreContentProviderUtils.extractResultIdFromObjectId(objectId); assertNull(extractedResultId); }
public static String extractResultIdFromObjectId(String objectId) { if (objectId!=null && objectId.indexOf(objectIdSeparator)>0) { StringBuffer strBuff = new StringBuffer(); strBuff.append(InfoSpaceConstants.ROW_PREFIX_RESULT); String[] split = objectId.split(objectIdSeparator); if (split.length>=2) { strBuff.append(split[0]); strBuff.append(objectIdSeparator); strBuff.append(split[1]); return strBuff.toString(); } else { throw new RuntimeException("invalid object identifier: "); } } else { return null; } }
ObjectStoreContentProviderUtils { public static String extractResultIdFromObjectId(String objectId) { if (objectId!=null && objectId.indexOf(objectIdSeparator)>0) { StringBuffer strBuff = new StringBuffer(); strBuff.append(InfoSpaceConstants.ROW_PREFIX_RESULT); String[] split = objectId.split(objectIdSeparator); if (split.length>=2) { strBuff.append(split[0]); strBuff.append(objectIdSeparator); strBuff.append(split[1]); return strBuff.toString(); } else { throw new RuntimeException("invalid object identifier: "); } } else { return null; } } }
ObjectStoreContentProviderUtils { public static String extractResultIdFromObjectId(String objectId) { if (objectId!=null && objectId.indexOf(objectIdSeparator)>0) { StringBuffer strBuff = new StringBuffer(); strBuff.append(InfoSpaceConstants.ROW_PREFIX_RESULT); String[] split = objectId.split(objectIdSeparator); if (split.length>=2) { strBuff.append(split[0]); strBuff.append(objectIdSeparator); strBuff.append(split[1]); return strBuff.toString(); } else { throw new RuntimeException("invalid object identifier: "); } } else { return null; } } private  ObjectStoreContentProviderUtils(); }
ObjectStoreContentProviderUtils { public static String extractResultIdFromObjectId(String objectId) { if (objectId!=null && objectId.indexOf(objectIdSeparator)>0) { StringBuffer strBuff = new StringBuffer(); strBuff.append(InfoSpaceConstants.ROW_PREFIX_RESULT); String[] split = objectId.split(objectIdSeparator); if (split.length>=2) { strBuff.append(split[0]); strBuff.append(objectIdSeparator); strBuff.append(split[1]); return strBuff.toString(); } else { throw new RuntimeException("invalid object identifier: "); } } else { return null; } } private  ObjectStoreContentProviderUtils(); static byte[] getContentFromURL(String resourceLoc,
			ContentRetrievalContext context); static byte[] getContentFromURL(URL url,
            ContentRetrievalContext context); static String generateObjectId(String resultId, String url,
			String defaultEncoding, String digestAlgorithm); static String extractResultIdFromObjectId(String objectId); }
ObjectStoreContentProviderUtils { public static String extractResultIdFromObjectId(String objectId) { if (objectId!=null && objectId.indexOf(objectIdSeparator)>0) { StringBuffer strBuff = new StringBuffer(); strBuff.append(InfoSpaceConstants.ROW_PREFIX_RESULT); String[] split = objectId.split(objectIdSeparator); if (split.length>=2) { strBuff.append(split[0]); strBuff.append(objectIdSeparator); strBuff.append(split[1]); return strBuff.toString(); } else { throw new RuntimeException("invalid object identifier: "); } } else { return null; } } private  ObjectStoreContentProviderUtils(); static byte[] getContentFromURL(String resourceLoc,
			ContentRetrievalContext context); static byte[] getContentFromURL(URL url,
            ContentRetrievalContext context); static String generateObjectId(String resultId, String url,
			String defaultEncoding, String digestAlgorithm); static String extractResultIdFromObjectId(String objectId); static final String defaultEncoding; }