ZeroMemes / Alpine

A lightweight event system for Java 8+
MIT License
95 stars 19 forks source link

Generic events cause runtime ClassCastException #16

Closed ZeroMemes closed 1 year ago

ZeroMemes commented 1 year ago

If a Listener is created for an event type with a generic type parameter, the type parameter won't be respected at runtime. This can lead to unexpected ClassCastExceptions being thrown.

Adding support for generic events could be an enhancement in the future, but for now, it should throw an exception during discovery.