groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject @ListenerList generated fireWhatever() method stops working
Date Wed, 08 Mar 2017 09:49:59 GMT

as described in the question on SO
and confirmed by @aalmiray the fireWhatever() method generated when
using @ListenerList annotation stops working.

@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

import groovy.beans.ListenerList

interface MessageListener {
  void messageReceived(byte[] msg)

class MessageProducer {
  List<MessageListener> listeners

  void produce(String msg) {

producer = new MessageProducer()
producer.addMessageListener({ println it } as MessageListener)

The stacktrace is

Exception thrown

java.lang.NoSuchMethodError: MessageProducer.fireMessageReceived([B)V
	at MessageProducer$fireMessageReceived$0.callCurrent(Unknown
Source) at MessageProducer.produce(ConsoleScript0:12)
	at MessageProducer$ Source)

Are we doing something wrong or is this a bug?

Thank you
Frigo Pratser

View raw message