1 String[] itemId = spModel.getItemId().split(","); 2 List list = Arrays.asList(itemId); 3 Set set = new HashSet(list); 4 itemId=(String [])set.toArray(new String[0]);