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

NPE in Add to -buildpath Quickfix #6096

Closed
chrisrueger opened this issue Apr 23, 2024 · 2 comments · Fixed by #6097
Closed

NPE in Add to -buildpath Quickfix #6096

chrisrueger opened this issue Apr 23, 2024 · 2 comments · Fixed by #6097

Comments

@chrisrueger
Copy link
Contributor

chrisrueger commented Apr 23, 2024

I am on Snapshot Bndtools 7.1.0.DEV-202404191120-gd2fc304 and just got this, which I haven't seen before.

  1. use the Quickfix for "Add to buildpath"
image
  1. I got this:
image
java.lang.NullPointerException: Cannot invoke "java.io.File.toPath()" because "file" is null
	at aQute.lib.io.IO.stream(IO.java:1255)
	at aQute.bnd.build.model.BndEditModel.loadFrom(BndEditModel.java:436)
	at aQute.bnd.build.model.BndEditModel.load(BndEditModel.java:1543)
	at org.bndtools.core.editors.quickfix.AddBundleCompletionProposal.lambda$runInWorkspace$0(AddBundleCompletionProposal.java:107)
	at aQute.bnd.build.WorkspaceLock.locked(WorkspaceLock.java:168)
	at aQute.bnd.build.Workspace.readLocked(Workspace.java:1504)
	at org.bndtools.core.editors.quickfix.AddBundleCompletionProposal.runInWorkspace(AddBundleCompletionProposal.java:104)
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:43)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

The bnd.bnd is not updated anymore. I remember this used to work, as I use it quiete often.

Maybe related to the recent work on BndEditModel ? @pkriens

pkriens added a commit to pkriens/bnd that referenced this issue Apr 23, 2024
---
 Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>

Signed-off-by: Peter Kriens <Peter.Kriens@aQute.biz>
@pkriens
Copy link
Member

pkriens commented Apr 23, 2024

Yes, my bad. Just pushed a PR

@chrisrueger
Copy link
Contributor Author

@pkriens I can confirm this fixes the problem above. Quickfix is working again 👍

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

Successfully merging a pull request may close this issue.

2 participants