Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ProjectInfo: NullPointerException #3

Closed
vpithan opened this issue Jul 20, 2022 · 3 comments
Closed

ProjectInfo: NullPointerException #3

vpithan opened this issue Jul 20, 2022 · 3 comments

Comments

@vpithan
Copy link

vpithan commented Jul 20, 2022

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.

@vpithan
Copy link
Author

vpithan commented Jul 20, 2022

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.

@guilhermeslacerda
Copy link
Owner

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?

@guilhermeslacerda
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants