Source:
<code>public static String getControlledVocabulariesDisplayValueLocalized(Item item, DCValue[] values, String schema, String element, String qualifier, Locale locale) throws SQLException, DCInputsReaderException{ String toReturn=""; DCInput myInputs = null; boolean myInputsFound=false; String formFileName = I18nUtil.getInputFormsFileName(locale); DCInputSet inputSet = null; DCInputsReader inputsReader = null; String col_handle = ""; Collection collection = item.getOwningCollection(); if (collection==null) { <START> col_handle = "db-id/" + item.getID(); <END> } else { col_handle = collection.getHandle(); } if (inputsReader == null) { inputsReader = new DCInputsReader(formFileName); } inputSet = inputsReader.getInputs(col_handle); String currentField = schema+"."+element+(qualifier==null?"":"."+qualifier); if (inputSet!=null){ int pageNums= inputSet.getNumberPages(); for (int p=0;p<pageNums;p++){ DCInput[] inputs = inputSet.getPageRows(p, false, false); if (inputs!=null){ for (int i=0; i<inputs.length;i++){ String inputField=inputs[i].getSchema()+"."+inputs[i].getElement()+(inputs[i].getQualifier()==null?"":"."+inputs[i].getQualifier()); if (currentField.equals(inputField)){ myInputs = inputs[i]; myInputsFound=true; break; } } } if (myInputsFound) break; } } if (myInputsFound) { for (int j = 0; j < values.length; j++){ String pairsName = myInputs.getPairsType(); String stored_value = values[j].value; String displayVal = myInputs.getDisplayString(pairsName,stored_value); if (displayVal!=null && !"".equals(displayVal)){ return displayVal; } } } return toReturn; }</code><technical_language>in this case is more return immediately (the item is inprogress submission discover right collection queries workspace workflow tables)</technical_language>

Target:
public static List<String> getControlledVocabulariesDisplayValueLocalized( Item item, DCValue[] values, String schema, String element, String qualifier, Locale locale) throws SQLException, DCInputsReaderException { List<String> toReturn = new ArrayList<String>(); DCInput myInputs = null; boolean myInputsFound = false; String formFileName = I18nUtil.getInputFormsFileName(locale); String col_handle = ""; Collection collection = item.getOwningCollection(); if (collection == null) { col_handle = ""; } else { col_handle = collection.getHandle(); } DCInputsReader inputsReader = new DCInputsReader(formFileName); DCInputSet inputSet = inputsReader.getInputs(col_handle); String currentField = schema + "." + element + (qualifier == null ? "" : "." + qualifier); if (inputSet != null) { int pageNums = inputSet.getNumberPages(); for (int p = 0; p < pageNums; p++) { DCInput[] inputs = inputSet.getPageRows(p, false, false); if (inputs != null) { for (int i = 0; i < inputs.length; i++) { String inputField = inputs[i].getSchema() + "." + inputs[i].getElement() + (inputs[i].getQualifier() == null ? "" : "." + inputs[i].getQualifier()); if (currentField.equals(inputField)) { myInputs = inputs[i]; myInputsFound = true; break; } } } if (myInputsFound) break; } } if (myInputsFound) { for (int j = 0; j < values.length; j++) { String pairsName = myInputs.getPairsType(); String stored_value = values[j].value; String displayVal = myInputs.getDisplayString(pairsName, stored_value); if (displayVal != null && !"".equals(displayVal)) { toReturn.add(displayVal); } } } return toReturn; }