Skip to content

NPE while updating Spring Boot version #1241

Closed

Description

@martinlippert

Used the latest snapshot build for 4.22.1 on Eclipse 2024-03, created a Rest Service sample from the guides, and tried to execute the quick fix to upgrade the boot version to the latest patch via right-click on the problem in the problems view.

Executing the quick fix results in:

java.lang.NullPointerException: Cannot invoke "java.lang.Boolean.booleanValue()" because the return value of "org.eclipse.lsp4j.ChangeAnnotation.getNeedsConfirmation()" is null
	at org.eclipse.lsp4e.LSPEclipseUtils.lambda$1(LSPEclipseUtils.java:936)
	at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90)
	at java.base/java.util.Spliterators$IteratorSpliterator.tryAdvance(Spliterators.java:1856)
	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129)
	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527)
	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513)
	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230)
	at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196)
	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
	at java.base/java.util.stream.ReferencePipeline.anyMatch(ReferencePipeline.java:632)
	at org.eclipse.lsp4e.LSPEclipseUtils.applyWorkspaceEdit(LSPEclipseUtils.java:936)
	at org.eclipse.lsp4e.LanguageClientImpl$3.run(LanguageClientImpl.java:127)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

Activity

  1. added this to the 4.22.1.RELEASE milestone on Apr 26, 2024
  2. martinlippert commented on Apr 26, 2024

    @martinlippert
    MemberAuthor

    This seems to break more than just the boot upgrade via quick fix. When I execute the quick fix to remove @Autowired from a constructor, the same error message appears. This is seriously broken.

  3. martinlippert commented on Apr 26, 2024

    @martinlippert
    MemberAuthor

    I also observed the Convert @Autowired field into Constructor quick fix to not do anything (also broken), but it does not show up the error above, just does nothing. Maybe the same, maybe a different issue.

  4. BoykoAlex commented on Apr 26, 2024

    @BoykoAlex
    Contributor

    I also observed the Convert @Autowired field into Constructor quick fix to not do anything (also broken), but it does not show up the error above, just does nothing. Maybe the same, maybe a different issue.

    I saw that only some cases don't work... Need to investigate why that happens. It worked fine for me now but it could be a different rewrite snapshot.

    I'm creating a PR for the NPE you've observed above.

  5. BoykoAlex commented on Apr 26, 2024

    @BoykoAlex
    Contributor

    Here is the lsp4e PR: eclipse-lsp4e/lsp4e#979

  6. BoykoAlex commented on Apr 26, 2024

    @BoykoAlex
    Contributor

    Fixed and the new distro has the lsp4e snapshot with the fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions