hekailiang/squirrel — pull request #4 by dant3 (2013-10-14 07:59:59+00:00)
Title: Fix NPE with clazz.getName() on logger with trace level enabled.

I found my app crashes all the time on creating FSM with Squirell. After investigation I found that in most of the cases some methods were called with clazz being null, but in logger sections for isTraceEnabled there were direct calls to clazz.getName() which caused NPE. So my app was crashing just because I set level of logger for Level.ALL.

This pull requiest solves the issue by adding utility method to check clazz for null before getting it's name for logging/exception throwing. I replaced all the clazz.getName invokes with this utility method.

Testing: I'm now able to use FSM with Level.ALL logger:
```V/MyApp/o.s.f.u.ReflectUtils ( 2124): [main] creating new instance for class 'null' with args [{...[blah,blah]...}]```