private List fromListText()

in taverna-configuration-api/src/main/java/org/apache/taverna/configuration/AbstractConfigurable.java [151:168]


	private List<String> fromListText(String property) {
		List<String> result = new ArrayList<String>();
		if (property.length()>0) { //an empty string as assumed to be an empty list, rather than a list with 1 empty string in it!
			StringReader reader = new StringReader(property);
			try (CSVParser csvReader = new CSVParser(reader,CSVFormat.DEFAULT)){
				
				for (CSVRecord v : csvReader.getRecords()) {
					Iterator<String> itr = v.iterator();
					while(itr.hasNext())result.add(itr.next());
					
				}
			} catch (IOException e) {
				logger.error("Exception occurred parsing CSV properties:"+property,e);
			}
			
		}
		return result;
	}