groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8110) @ListenerList generated fireWhatever() method stops working
Date Thu, 09 Mar 2017 08:01:38 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8110?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15902636#comment-15902636
] 

ASF GitHub Bot commented on GROOVY-8110:
----------------------------------------

GitHub user paulk-asert opened a pull request:

    https://github.com/apache/groovy/pull/510

    GROOVY-8110: @ListenerList generated fireWhatever() method stops working

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/paulk-asert/groovy groovy8110

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/510.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #510
    
----
commit d98c82000ce2e8e832242eeb5ddac4e63759d3b9
Author: paulk <paulk@asert.com.au>
Date:   2017-03-09T07:59:15Z

    GROOVY-8110: @ListenerList generated fireWhatever() method stops working

----


> @ListenerList generated fireWhatever() method stops working
> -----------------------------------------------------------
>
>                 Key: GROOVY-8110
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8110
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.4.7, 2.4.8
>            Reporter: Frigo Pratser
>            Priority: Minor
>
> As described in the question on SO
> [http://stackoverflow.com/questions/42648766/groovy-listenerlist-generated-firexxx-method-stops-working]
> and confirmed by @aalmiray the fireWhatever() method generated when
> using @ListenerList annotation stops working after some calls.
> [@aalmiray|http://stackoverflow.com/users/120745/aalmiray] s code as posted in his reply
reproduces the problem with
> Groovy 2.4.7 and I confirmed it with 2.4.8 running it in groovyConsole. The difference
between this code and the longer one in the SO question is that in the longer version the
call works but if called periodically after some time it produces the same Exception.
> {code:title=MessageProducer.groovy|borderStyle=solid}
> import groovy.beans.ListenerList
> interface MessageListener {
>   void messageReceived(byte[] msg)
> }
> class MessageProducer {
>   @ListenerList
>   List<MessageListener> listeners
>   void produce(String msg) {
>     fireMessageReceived(msg.getBytes())
>   }
> }
> producer = new MessageProducer()
> producer.addMessageListener({ println it } as MessageListener)
> producer.produce('Groovy')
> {code}
> {code:title=Stacktrace|borderStyle=solid}
> Exception thrown
> java.lang.NoSuchMethodError: MessageProducer.fireMessageReceived([B)V
>         at MessageProducer$fireMessageReceived$0.callCurrent(Unknown
> Source) at MessageProducer.produce(ConsoleScript0:12)
>         at MessageProducer$produce.call(Unknown Source)
>         at ConsoleScript0.run(ConsoleScript0:18
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message