mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-17 06:53:09 +00:00
[DS-707] Replace tight loops
git-svn-id: http://scm.dspace.org/svn/repo/dspace/trunk@5501 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -43,6 +43,7 @@ import java.sql.PreparedStatement;
|
|||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.MissingResourceException;
|
import java.util.MissingResourceException;
|
||||||
|
|
||||||
@@ -1254,11 +1255,7 @@ public class Collection extends DSpaceObject
|
|||||||
|
|
||||||
// now add any parent communities
|
// now add any parent communities
|
||||||
Community[] parents = owner.getAllParents();
|
Community[] parents = owner.getAllParents();
|
||||||
|
communities.addAll(Arrays.asList(parents));
|
||||||
for (int i = 0; i < parents.length; i++)
|
|
||||||
{
|
|
||||||
communities.add(parents[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
@@ -42,6 +42,7 @@ import java.io.IOException;
|
|||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
@@ -1092,11 +1093,7 @@ public class Item extends DSpaceObject
|
|||||||
|
|
||||||
// now add any parent communities
|
// now add any parent communities
|
||||||
Community[] parents = owner.getAllParents();
|
Community[] parents = owner.getAllParents();
|
||||||
|
communities.addAll(Arrays.asList(parents));
|
||||||
for (int i = 0; i < parents.length; i++)
|
|
||||||
{
|
|
||||||
communities.add(parents[i]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
finally
|
finally
|
||||||
|
Reference in New Issue
Block a user