ProjectInfo: NullPointerException
Closed this issue · 3 comments
Good night,
I received this error while scanning my project. Maybe It'll be great to have more info in this error.
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:61)
Caused by: java.lang.NullPointerException
at selection.ProjectInfo.show(ProjectInfo.java:59)
at main.Bootstrapper.analyzeAndShow(Bootstrapper.java:51)
at main.Bootstrapper.runApp(Bootstrapper.java:36)
at main.Bootstrapper.main(Bootstrapper.java:26)
... 5 more
Please, let me know if you need more information.
I think found my mistake. When I tried to follow the example into the web site I used -S
to scan my project. The correct option is -s (in lowercase).
./drtools-metric.sh /home/souza/dev/projects/syonet/syonet-crm -S --console
Maybe It's better to:
- Validate the options before start.
- Use the CLI pattern and uppercase all single hyphen
-
. - Return a friendly message when It doesn't find an option.
Hi Vinicius!
How are you?
Is your project open source? Is it available in any public repository?
If yes, let me know the URL so I can test it.
What options (for instance, -s --console) did you use?
Hi Vinicius!
Thanks for the feedback :)
I fixed using the upper case format for options (version 1.6.1).
The drtools-metric shows all valid options and examples always the user use an invalid option.