Add generics to remove compiler warnings.

This commit is contained in:
j2blake 2011-11-03 14:34:17 +00:00
parent 1c57b221eb
commit d8afc2082f

View file

@ -13,6 +13,7 @@ import java.util.Set;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import edu.cornell.mannlib.vedit.beans.Option;
import edu.cornell.mannlib.vedit.util.FormUtils; import edu.cornell.mannlib.vedit.util.FormUtils;
import edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper; import edu.cornell.mannlib.vitro.webapp.auth.policy.PolicyHelper;
import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.Actions; import edu.cornell.mannlib.vitro.webapp.auth.requestedAction.Actions;
@ -96,15 +97,15 @@ public class BaseSiteAdminController extends FreemarkerHttpServlet {
WebappDaoFactory wadf = vreq.getFullWebappDaoFactory(); WebappDaoFactory wadf = vreq.getFullWebappDaoFactory();
// Create map for data input entry form options list // Create map for data input entry form options list
List classGroups = wadf.getVClassGroupDao().getPublicGroupsWithVClasses(true,true,false); // order by displayRank, include uninstantiated classes, don't get the counts of individuals List<VClassGroup> classGroups = wadf.getVClassGroupDao().getPublicGroupsWithVClasses(true,true,false); // order by displayRank, include uninstantiated classes, don't get the counts of individuals
Set<String> seenGroupNames = new HashSet<String>(); Set<String> seenGroupNames = new HashSet<String>();
Iterator classGroupIt = classGroups.iterator(); Iterator<VClassGroup> classGroupIt = classGroups.iterator();
LinkedHashMap<String, List> orderedClassGroups = new LinkedHashMap<String, List>(classGroups.size()); LinkedHashMap<String, List<Option>> orderedClassGroups = new LinkedHashMap<String, List<Option>>(classGroups.size());
while (classGroupIt.hasNext()) { while (classGroupIt.hasNext()) {
VClassGroup group = (VClassGroup)classGroupIt.next(); VClassGroup group = classGroupIt.next();
List opts = FormUtils.makeOptionListFromBeans(group.getVitroClassList(),"URI","PickListName",null,null,false); List<Option> opts = FormUtils.makeOptionListFromBeans(group.getVitroClassList(),"URI","PickListName",null,null,false);
if( seenGroupNames.contains(group.getPublicName() )){ if( seenGroupNames.contains(group.getPublicName() )){
//have a duplicate classgroup name, stick in the URI //have a duplicate classgroup name, stick in the URI
orderedClassGroups.put(group.getPublicName() + " ("+group.getURI()+")", opts); orderedClassGroups.put(group.getPublicName() + " ("+group.getURI()+")", opts);