Data Binding and Validation, getEventBus - Java Error [fixed]

I follow the Tutorial in the Vaadin documentation. At the section “Forms and Validation” if I implement the code for “Setting Up Component Events” IntelliJ displays an Error when I try to build the project.
The Error is “java: class, interface, or enum expected” and the cursor jumps to the 4th last line of additional code, inbetween public and the greater as bevore the T (public |<T extends ComponentEvent<<?>> Regi…).

Does anybody have an Idea, where I’ve made a mistake?

What version of Vaadin are you using? What version of the tutorial are you on?

Tutorial: Version 23
according to the pomp.xml file:
-Java: 11
-Vaadin: 23.2.6

Can you please post your code

I hope it is ok if I’ve just zipped the projectfolder and upload it here. If not please let me know and I will send it in a different way.

The curly brace on line 83 should be on line 122

That’s all

a big thank you, have a nice day!

getEventBus from Tutorial Java Error [fixed]

Data Binding and Validation, getEventBus - Java Error [fixed]