Return type of Command handlers


The manual, chapter 3, contains the following phrase for command handlers that return nothing:

As return value in such a case, you are recommended to use Void.TYPE, the official representation of the void keyword.

I find it weird to recommend returning a reference of type java.lang.Class. The value referred to by Void.TYPE is the class object that represents void, it is not something of type Void (nor void) itself.

I would recommend returning null, the only value of type java.lang.Void.
Makes sense?

Hi Erik,

you are totally right. I will change the documentation and code accordingly. I must have misinterpreted the JavaDoc on Void.TYPE at the time.

Thanks for reporting it.