Kai S. K. Engelbart kske
  • Joined on 2020-08-15
kske pushed to develop at zdm/event-bus 2021-02-19 11:17:47 +01:00
4a5b94a9b7 Allow event handlers with non-void return type
b750fe866a Allow event handlers with non-void return type
Compare 2 commits »
kske pushed tag 1.0.0 to zdm/event-bus 2021-02-19 11:17:22 +01:00
kske deleted tag 1.0.0 from zdm/event-bus 2021-02-19 11:17:12 +01:00
kske pushed to f/additional-warnings at zdm/event-bus 2021-02-18 22:17:06 +01:00
ffc75d3615 Warn about unnecessarily polymorphic event handlers
kske released Minesweeper 1.1 at kske/minesweeper 2021-02-18 21:08:32 +01:00
kske commented on issue zdm/event-bus#7 2021-02-18 08:01:09 +01:00
Weak References to Event Listeners

Alright, so as discussed I will make weak references the default for event listeners, while adding an annotation which enforces a regular reference.

kske commented on issue zdm/event-bus#6 2021-02-17 13:38:03 +01:00
Reimplement Return Value Warning

I have implemented it and it behaves exactly as I thought:

I can detect the @SuppressWarnings("unused-return") on the method and thus hide the warning, but simultaneously get an "Unsupported…

kske commented on issue zdm/event-bus#6 2021-02-17 13:27:12 +01:00
Reimplement Return Value Warning

I will try implementing this and get back to you with the results.

kske commented on issue zdm/event-bus#6 2021-02-17 13:26:33 +01:00
Reimplement Return Value Warning

The check is not the problem. The problem is, that Eclipse and probably other compilers as well would warn the user about the unhandled warning token, which would leave the user with yet another…

kske commented on issue zdm/event-bus#7 2021-02-17 13:22:28 +01:00
Weak References to Event Listeners

This only proves that the need for garbage collection is actually negligibe as most event listeners have the same lifetime as the entire application.

If a listener with a restricted lifetime…

kske commented on issue zdm/event-bus#6 2021-02-17 13:09:56 +01:00
Reimplement Return Value Warning

Agreed, but how would you go about suppressing the warning? Define a custom warning string to use in @SuppressWarnings, or just introduce parameters for the processor? I will have a look into that.

kske commented on issue zdm/event-bus#6 2021-02-17 12:48:45 +01:00
Reimplement Return Value Warning

That's a good idea, however we have to find a way of suppressing the warning if a non-void return type actually has to be used, for example when retrofitting code to utilize event handling.

kske commented on issue zdm/event-bus#7 2021-02-17 12:41:38 +01:00
Weak References to Event Listeners

For that reason, EventBus#removeListener exists. If we no longer need a listener, we remove it and then it's available for garbage collection.

If, however, a dedicated event listener is defined…

kske pushed tag 1.0.0 to zdm/event-bus 2021-02-17 11:33:59 +01:00
kske deleted tag 1.0.0 from zdm/event-bus 2021-02-17 11:33:47 +01:00
kske pushed to develop at zdm/event-bus 2021-02-17 11:31:01 +01:00
b750fe866a Allow event handlers with non-void return type
1cd6085d21 Allow event handlers with non-void return type
Compare 2 commits »
kske pushed to develop at zdm/event-bus 2021-02-17 11:28:21 +01:00
1cd6085d21 Allow event handlers with non-void return type
86ef6f5762 Allow event handlers with non-void return type
Compare 2 commits »
kske released Event Bus 1.0.0 at zdm/event-bus 2021-02-17 09:34:00 +01:00
kske pushed to develop at zdm/event-bus 2021-02-17 08:58:04 +01:00
86ef6f5762 Allow event handlers with non-void return type
f9a430ff40 Allow event handlers with non-void return type
Compare 2 commits »
kske pushed to develop at zdm/event-bus 2021-02-17 08:55:36 +01:00
f9a430ff40 Allow event handlers with non-void return type