[jira] Created: (MUSE-285) ArrayIndexOutOfBoundsException when SimpleResourceManager.getListeners() performs new LinkedList(_listeners);

View: New views
4 Messages — Rating Filter:   Alert me  

[jira] Created: (MUSE-285) ArrayIndexOutOfBoundsException when SimpleResourceManager.getListeners() performs new LinkedList(_listeners);

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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


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@...
For additional commands, e-mail: muse-dev-help@...


[jira] Updated: (MUSE-285) ArrayIndexOutOfBoundsException when SimpleResourceManager.getListeners() performs new LinkedList(_listeners);

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


     [ 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@...
For additional commands, e-mail: muse-dev-help@...


[jira] Assigned: (MUSE-285) ArrayIndexOutOfBoundsException when SimpleResourceManager.getListeners() performs new LinkedList(_listeners);

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Chris Twiner reassigned MUSE-285:
---------------------------------

    Assignee: Chris Twiner  (was: Dan Jemiolo)

> 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: Chris Twiner
>             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@...
For additional commands, e-mail: muse-dev-help@...


[jira] Resolved: (MUSE-285) ArrayIndexOutOfBoundsException when SimpleResourceManager.getListeners() performs new LinkedList(_listeners);

by JIRA jira@apache.org :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


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

Chris Twiner resolved MUSE-285.
-------------------------------

    Resolution: Fixed

in head

> 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: Chris Twiner
>             Fix For: 2.2.1
>
>
> 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@...
For additional commands, e-mail: muse-dev-help@...