ws-muse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eitan Plotnik (JIRA)" <j...@apache.org>
Subject [jira] Updated: (MUSE-285) ArrayIndexOutOfBoundsException when SimpleResourceManager.getListeners() performs new LinkedList(_listeners);
Date Sun, 13 Apr 2008 14:57:06 GMT

     [ https://issues.apache.org/jira/browse/MUSE-285?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Eitan Plotnik updated MUSE-285:
-------------------------------

    Fix Version/s: 2.3.0

> ArrayIndexOutOfBoundsException when SimpleResourceManager.getListeners() performs new
LinkedList(_listeners);
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: MUSE-285
>                 URL: https://issues.apache.org/jira/browse/MUSE-285
>             Project: Muse
>          Issue Type: Bug
>          Components: Core Engine - Resource and Capability APIs
>    Affects Versions: 2.2.0
>         Environment: any
>            Reporter: Eitan Plotnik
>            Assignee: Dan Jemiolo
>             Fix For: 2.3.0
>
>
> SimpleResourceManager.getListeners() invokes new LinkedList(_listeners) which in turn
calls toArray() on the _listners linked list in the argument.
> The toArray() throws ArrayIndexOutOfBoundsException in case objects were added to _listeners
while it's in progress.
> addListener() and removeListener() are synchronized methods. I think so should be getListeners().
> I think getListeners() signature should be modified 
> from: protected List getListeners()
> to: protected synchronized List getListeners()
> Stack trace:
>       java.lang.ArrayIndexOutOfBoundsException: 1606
>       	at java.util.LinkedList.toArray(LinkedList.java:694)
>       	at java.util.LinkedList.addAll(LinkedList.java:265)
>       	at java.util.LinkedList.addAll(LinkedList.java:242)
>       	at java.util.LinkedList.<init>(LinkedList.java:98)
>       	at org.apache.muse.core.SimpleResourceManager.getListeners(SimpleResourceManager.java:223)
>       	at org.apache.muse.core.SimpleResourceManager.addResource(SimpleResourceManager.java:107)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: muse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: muse-dev-help@ws.apache.org


Mime
View raw message