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

Command Junit throws NPE #4634

Closed
stbischof opened this issue Apr 23, 2021 · 5 comments
Closed

Command Junit throws NPE #4634

stbischof opened this issue Apr 23, 2021 · 5 comments
Labels
abeyance need of contributor [requires is:closed] stale Stale issue or pull request

Comments

@stbischof
Copy link
Contributor

stbischof commented Apr 23, 2021

i tried to run bnd.jar junit on this https://github.com/bndtools/bnd/tree/master/biz.aQute.launchpad.tests

this results in:

Errors
000: Exception: java.lang.NullPointerException
	at aQute.bnd.build.JUnitLauncher.launch(JUnitLauncher.java:66)
	at aQute.bnd.build.Project.junit(Project.java:2541)
	at aQute.bnd.main.bnd.lambda$_junit$4(bnd.java:1057)
	at aQute.bnd.main.bnd.perProject(bnd.java:937)
	at aQute.bnd.main.bnd.perProject(bnd.java:917)
	at aQute.bnd.main.bnd._junit(bnd.java:1057)
	at aQute.lib.getopt.CommandLine.execute(CommandLine.java:157)
	at aQute.bnd.main.bnd._bnd(bnd.java:444)
	at aQute.lib.getopt.CommandLine.execute(CommandLine.java:157)
	at aQute.bnd.main.bnd.start(bnd.java:292)
	at aQute.bnd.main.bnd.main(bnd.java:269)

001: NullPointerException

seems that the prepare method of https://github.com/bndtools/bnd/blob/master/biz.aQute.bndlib/src/aQute/bnd/build/JUnitLauncher.java is never called.

@stbischof stbischof changed the title Command Junit with Launchpad Command Junit throws NPE Apr 23, 2021
@bjhargrave
Copy link
Member

To run those tests, run ./gradlew :biz.aQute.launchpad.tests:test.

I don't know anything about the bnd junit command or if it is tested or even works. Looking at JUnitLauncher, it seems somewhat incorrect in multiple ways. I think it is basically dead code.

@stbischof
Copy link
Contributor Author

There are some people that like bnd command's more than grade. They came up with the question about this command. So i though easiest way to test is project.. just to have something to reproduce the problem.

But i think we should either fix this or remove the command.

Afaik they use the paralle build and run command quiet often.

@bjhargrave
Copy link
Member

If the command is broken, then it can certainly be fixed and some tests added to make sure it stays fixed.

As for the Bnd build itself, you must use the gradle build to build and test Bnd.

@bjhargrave bjhargrave added the abeyance need of contributor [requires is:closed] label Apr 30, 2021
@stale
Copy link

stale bot commented Apr 30, 2022

This issue has been automatically marked as stale because it has not had recent activity. Given the limited bandwidth of the team, it will be automatically closed if no further activity occurs. If you feel this is something you could contribute, please have a look at our Contributor Guide. Thank you for your contribution.

@stale stale bot added the stale Stale issue or pull request label Apr 30, 2022
@stale
Copy link

stale bot commented May 25, 2022

This issue has been automatically closed due to inactivity. If you can reproduce this on a recent version of Bnd/Bndtools or if you have a good use case for this feature, please feel free to reopen the issue with steps to reproduce, a quick explanation of your use case or a high-quality pull request.

@stale stale bot closed this as completed May 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abeyance need of contributor [requires is:closed] stale Stale issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants