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

Lots of NPE noise in language server #90

Closed
dsyer opened this issue Sep 28, 2018 · 3 comments
Closed

Lots of NPE noise in language server #90

dsyer opened this issue Sep 28, 2018 · 3 comments
Milestone

Comments

@dsyer
Copy link
Member

dsyer commented Sep 28, 2018

This is apparently harmless (the project still compiles), but probably unintentional:

[pool-2-thread-1] ERROR org.springframework.ide.vscode.boot.java.utils.SpringIndexer - error extracting symbol information in project 'micro-function' - for docURI 'file:///home/dsyer/dev/thin/workspace/micro-function/src/main/java/com/example/app/Endpoint.java' - on node: @SuppressWarnings({"unchecked"}) @Bean public <T>RouterFunction<?> userEndpoints(){
  return route(POST("/"),request -> ok().body((Flux<T>)this.function.apply(request.bodyToFlux(this.inspector.getInputType(this.function))),(Class<T>)this.inspector.getOutputType(this.function)));
}

java.lang.NullPointerException
	at org.springframework.ide.vscode.boot.java.requestmapping.WebfluxPathFinder.visit(WebfluxPathFinder.java:52)
...

The project is https://github.com/dsyer/spring-boot-micro-apps.

@martinlippert martinlippert added this to the 4.0.1 milestone Oct 1, 2018
@martinlippert
Copy link
Member

I cloned the repo, but can't find this file:
src/main/java/com/example/app/Endpoint.java (to which the error message refers to)

Any hint where I can find that file/type?

@dsyer
Copy link
Member Author

dsyer commented Oct 2, 2018

Sorry. There's a branch called "function". Hopefully you won't need a ton of other stuff that I only have locally.

@martinlippert
Copy link
Member

I can see the code now, but can't reproduce the NPE. The NPE seems to be caused by the parser not being able to resolve a method binding, so maybe something else in the project or that file was broken at the same time?

Nevertheless the flux path finder should not throw a NPE in that case, but just ignore those situations and continue. I added a check for that, therefore marking this as solved for 4.0.1

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