Hello, Friends, I am attempting to update an old Vaadin 8.1.5 project to Vaadin 8.20.3. (We cannot go to the most current version of Vaadin 8 or switch versions now because of environment constraints). I am using MVP architecture for the project, and the project structure is based on Matti’s old sample project structures using Vaadin CDI and Navigation. I have the following base classes for each View:
• AbstractViewImpl<P extends AbstractPresenter> extends CustomComponent implements ViewService<P>, View
• AbstractPresenter<V extends ViewService>
• ViewService<P>
• View (This is a ViewImpl field)
I extend each of these classes as needed for Navigator View. Each Presenter receives javax events fired from the View and communicates to the BE via BE services that are injected into the Presenter. It moves DTOs/other information from the BE into the ViewImpl and subsequently the View. Enum values are included in some fields inside these DTOs.
When I updated the project from Vaadin 8.1.5 to Vaadin 8.20.3, enum fields inside DTOs are now null when I attempt to access them in the Impl. The DTO itself is never null. These enum field values are accessible and are NOT null when accessed in the Presenter – only in the Impl and thus in the View class. I confirmed this with printlns.
If I put a println in that accesses one of these fields inside of Presenter code - ex. System.out.println("Here is your enum value: " + dto.getEnumValue()) - I will get sometime this in the log: Here is your enum value: V.
If I put this same code in the ViewImpl, I get this in the log – Here is your enum value: null.
When I revert back to our current version 8.1.5, the enum value in the Impl printlns is the same as it is in the Presenter code. (Actually the printlns are there to confirm the conditions and where the anomaly lies. Production code that accessed enum values caused NullPointerExceptions. These also are remedied by the revert.)
Has anyone experienced anything like this or have any insight as to what might be going on here? I would greatly appreciate it. Thanks!