mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Avoid "Illegal Capacity" error, if number of hiddenActions > actions
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7956 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -293,8 +293,7 @@ public class ActionsConfigElement extends ConfigElementAdapter
|
|||||||
public Iterator<String> iterator()
|
public Iterator<String> iterator()
|
||||||
{
|
{
|
||||||
// create a list of the visible actions and return it's iterator
|
// create a list of the visible actions and return it's iterator
|
||||||
ArrayList<String> visibleActions = new ArrayList<String>(
|
ArrayList<String> visibleActions = new ArrayList<String>(this.actions.size());
|
||||||
this.actions.size() - this.hiddenActions.size());
|
|
||||||
for (String actionId : this.actions)
|
for (String actionId : this.actions)
|
||||||
{
|
{
|
||||||
if (this.hiddenActions.contains(actionId) == false)
|
if (this.hiddenActions.contains(actionId) == false)
|
||||||
@@ -303,6 +302,8 @@ public class ActionsConfigElement extends ConfigElementAdapter
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
visibleActions.trimToSize();
|
||||||
|
|
||||||
return visibleActions.iterator();
|
return visibleActions.iterator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user