Closed AKreisel closed 6 years ago
Thanks for this hint. You are right. The full signature should be checked. By looking at this code I also think that we should use a Set instead of a List so that methods aren't discovered a second time. This would happen if a method "initialize" is also annotated with "@Initialize".
On initialiazing a view model, the FxmlViewLoader uses the method 'getInitializeMethods' In ViewLoaderReflectionUtils:
While the Javadoc correctly states that all methods annotated with @Initialize and methods having the signature "public void initialize()" are initializer methods, the code actually takes every method named "initialize" without checking the full signature (meaning it doesn't have parameters). This results in an exception if the view model contains only one method called "initialize" which expects at least one parameter.