Skip to content

Lots of NPE noise in language server #90

Closed

Description

@dsyer

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.

Activity

  1. added this to the 4.0.1 milestone on Oct 1, 2018
  2. martinlippert commented on Oct 2, 2018

    @martinlippert
    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?

  3. dsyer commented on Oct 2, 2018

    @dsyer
    MemberAuthor

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

  4. martinlippert commented on Oct 2, 2018

    @martinlippert
    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions