MCRCommand throw NPE if command method is not static
Description
Our method invocation relies on the fact that static methods can be invoked without an instance of the class. Currently we do not check if methods are really static (programming error) and hence a NullPointerException is thrown when we invoke that method on a null object.
We should give a nice error message when the MCRCommand is initialized, so that errors could be found more easily.
Environment
None
Activity
Thomas Scheffler
March 19, 2015 at 2:27 PM
implemented in r32195
Thomas Scheffler
March 19, 2015 at 2:26 PM
throw a friendly (explaining) exception if the Method is not static
Our method invocation relies on the fact that static methods can be invoked without an instance of the class. Currently we do not check if methods are really static (programming error) and hence a NullPointerException is thrown when we invoke that method on a
null
object.We should give a nice error message when the MCRCommand is initialized, so that errors could be found more easily.