RFR: SKARA-1096: New command and label for JEPs, similar to CSR [v8]

Guoxiong Li gli at openjdk.java.net
Tue Apr 19 16:53:35 UTC 2022


On Tue, 19 Apr 2022 15:57:37 GMT, Erik Joelsson <erikj at openjdk.org> wrote:

>> You are correct Magnus, that would be nicer indeed.
>
> The drawback of doing that is that JEPCommand would still need to implement the old handle method, which doesn't make sense for it to do. Unless we also add a default empty implementation for the original handle method.
> 
> @lgxbslgx If you want to change it to avoid touching all the other commands, using default methods in the interface instead, that's ok, but I'm also ok leaving it as it is.

> This way, the commands that need the new label handling mechanism can implement the new handle override with the extended argument list. All other commands needs no change.

If we obey this convention which adds a new "bridge" `handle` method. Next time, we want to add another parameter and add a new `handle` method, too. The interface `CommandHandler` will have sevaral such "bridge" `handle` methods in the future which are actually unnecessary. @erikj79, @magicus and I may feel good with it because we added or reviewed it. But in the future, the new SKARA developers may be confused by it. In other words, the maintainment of the project may become a little more complex.

>  but I'm also ok leaving it as it is.

I would like to keep the code as it is now.

-------------

PR: https://git.openjdk.java.net/skara/pull/1297


More information about the skara-dev mailing list