mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 15:03:18 +00:00
[DS-707] Fix array construction
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5463 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -141,7 +141,7 @@ public class MetadataUtilities {
|
|||||||
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
|
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
|
||||||
}
|
}
|
||||||
|
|
||||||
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[0]));
|
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[vals.size()]));
|
||||||
}
|
}
|
||||||
return found;
|
return found;
|
||||||
}
|
}
|
||||||
@@ -205,7 +205,7 @@ public class MetadataUtilities {
|
|||||||
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
|
item.clearMetadata(dtom.schema, dtom.element, dtom.qualifier, Item.ANY);
|
||||||
}
|
}
|
||||||
|
|
||||||
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[0]));
|
item.addMetadata(dtom.schema, dtom.element, dtom.qualifier, dtom.language, vals.toArray(new String[vals.size()]));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -94,7 +94,7 @@ public class SubmissionConfig implements Serializable
|
|||||||
this.isWorkflow = isWorkflowProcess;
|
this.isWorkflow = isWorkflowProcess;
|
||||||
|
|
||||||
// initialize a vector of SubmissionStepConfig objects
|
// initialize a vector of SubmissionStepConfig objects
|
||||||
Vector stepConfigs = new Vector();
|
Vector<SubmissionStepConfig> stepConfigs = new Vector<SubmissionStepConfig>();
|
||||||
|
|
||||||
// loop through our steps, and create SubmissionStepConfig objects
|
// loop through our steps, and create SubmissionStepConfig objects
|
||||||
for (int stepNum = 0; stepNum < steps.size(); stepNum++)
|
for (int stepNum = 0; stepNum < steps.size(); stepNum++)
|
||||||
@@ -121,8 +121,8 @@ public class SubmissionConfig implements Serializable
|
|||||||
}
|
}
|
||||||
|
|
||||||
// get steps as an array of Strings
|
// get steps as an array of Strings
|
||||||
submissionSteps = (SubmissionStepConfig[]) stepConfigs
|
submissionSteps = stepConfigs
|
||||||
.toArray(new SubmissionStepConfig[0]);
|
.toArray(new SubmissionStepConfig[stepConfigs.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -585,7 +585,7 @@ public class Context
|
|||||||
*/
|
*/
|
||||||
public Group[] getSpecialGroups() throws SQLException
|
public Group[] getSpecialGroups() throws SQLException
|
||||||
{
|
{
|
||||||
List myGroups = new ArrayList();
|
List<Group> myGroups = new ArrayList<Group>();
|
||||||
|
|
||||||
Iterator i = specialGroups.iterator();
|
Iterator i = specialGroups.iterator();
|
||||||
|
|
||||||
@@ -594,7 +594,7 @@ public class Context
|
|||||||
myGroups.add(Group.find(this, ((Integer) i.next()).intValue()));
|
myGroups.add(Group.find(this, ((Integer) i.next()).intValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Group[]) myGroups.toArray(new Group[0]);
|
return myGroups.toArray(new Group[myGroups.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void finalize()
|
protected void finalize()
|
||||||
|
@@ -428,7 +428,7 @@ public class Group extends DSpaceObject
|
|||||||
groupList.add(Group.find(c, (i.next()).intValue()));
|
groupList.add(Group.find(c, (i.next()).intValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Group[]) groupList.toArray(new Group[0]);
|
return groupList.toArray(new Group[groupList.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -566,7 +566,7 @@ public class Group extends DSpaceObject
|
|||||||
epersonList.add(EPerson.find(c, (i.next()).intValue()));
|
epersonList.add(EPerson.find(c, (i.next()).intValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
return (EPerson[]) epersonList.toArray(new EPerson[0]);
|
return epersonList.toArray(new EPerson[epersonList.size()]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Reference in New Issue
Block a user