Skip to content

Conversation

@tomaswolf
Copy link
Member

Make the method IoHandler.event() a default method.

This restores binary and source compatibility with 2.0.X except for classes that implement the IoHandler interface and also some other interface that would have a conflicting event() method. See JLS8 13.5.6.[1] However, since the event() method refers to the new type FilterEvent, there can be no such other conflicting method in existing code that was written and compiled against 2.0.X.

[1] https://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html#jls-13.5.6

Make the method IoHandler.event() a default method.

This restores binary and source compatibility with 2.0.X except for
classes that implement the IoHandler interface and also some other
interface that would have a conflicting event() method. See JLS8
13.5.6.[1] However, since the event() method refers to the new type
FilterEvent, there can be no such other conflicting method in existing
code that was written and compiled against 2.0.X.

[1] https://docs.oracle.com/javase/specs/jls/se8/html/jls-13.html#jls-13.5.6
@tomaswolf
Copy link
Member Author

@elecharny : you might want to consider doing this on the 2.1.X branch, too.

The point is that I want over in MINA SSHD the sshd-mina transport to work with either 2.0.X or 2.2.X. Currently that is not the case because we have our own class implementing IoHandler, so there'd be problems at run-time if sshd-mina is used together with mina-core:2.2.X.

The subclass in sshd-mina doesn't implement that event() method, and unless we bump the dependency in sshd-mina to 2.2.X, we can't since there is not FilterEvent type in 2.0.X. If we bump the dependency, then sshd-mina will not work anymore with mina-code 2.0.X. But we need to maintain compatibility with 2.0.X in sshd-mina; otherwise clients would be forced to upgrade mina-core, which they might not want to--if they've been using 2.0.X and it worked fine for them, forcing them to upgrade to 2.2.X with the (potentially huge) effort to re-test and re-validate their product is no good. One application I know of that uses sshd-mina with mina-core 2.0.X is Gerrit.

@elecharny
Copy link
Contributor

I see what you'd like to have, and that somehow makes sense: helping you coping with the changes, and having no impact for the 2.2.X branch.

@elecharny elecharny merged commit 04a9b94 into apache:2.2.X Mar 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants