Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The Invoker.toTypeString method blows up with a NullPointerException if one of the arguments is null. The NullPointerException occurs on Invoker.java, line 439:
argBuf.append(arguments[i].getClass().getName());
An argument might be null for example if a builder is invoked with a class parameter that either does not exist or has not been imported. For example, a PicoContainerBuidler:
builder.container()
{ component(class : WhoopsIMadeATypo) }The 'WhoopsIMadeATypo' arg shows up as null in the arguments array passed to Invoker.toString. So we get a NullPointerException Invoker.toString, which makes it really hard to figure out the real cause.
A simple null-check guard would fix this.