Skip to content

Fix NPE in spring-mvc - #2896

Merged
SylvainJuge merged 3 commits into
elastic:mainfrom
SylvainJuge:spring-mvc-npe
Dec 1, 2022
Merged

SylvainJuge merged 3 commits into
elastic:mainfrom
SylvainJuge:spring-mvc-npe

Conversation

@SylvainJuge

@SylvainJuge SylvainJuge commented Dec 1, 2022 •

Copy link
Copy Markdown
Member

What does this PR do?

Fixes NPE when the spring mvc view name is null.
This is triggered when with opbeans-java with a simple curl http://localhost:8080/

java.lang.NullPointerException
        at co.elastic.apm.agent.impl.transaction.AbstractSpan.appendToName(AbstractSpan.java:331)
        at co.elastic.apm.agent.impl.transaction.AbstractSpan.appendToName(AbstractSpan.java:327)
        at co.elastic.apm.agent.springwebmvc.ViewRenderInstrumentation$ViewRenderAdviceService.beforeExecute(ViewRenderInstrumentation.java:72)
        at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:307)
        ....
  • This is a bugfix

@SylvainJuge
SylvainJuge marked this pull request as ready for review December 1, 2022 09:10
@github-actions

github-actions Bot commented Dec 1, 2022

Copy link
Copy Markdown

/test

@ghost

ghost commented Dec 1, 2022 •

Copy link
Copy Markdown

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview preview

Expand to view the summary

Build stats

  • Start Time: 2022-12-01T10:37:18.343+0000

  • Duration: 62 min 50 sec

Test stats 🧪

Test Results
Failed 0
Passed 3228
Skipped 40
Total 3268

💚 Flaky test report

Tests succeeded.

🤖 GitHub comments

Expand to view the GitHub comments

To re-run your PR in the CI, just comment with:

  • /test : Re-trigger the build.

  • run benchmark tests : Run the benchmark tests.

  • run jdk compatibility tests : Run the JDK Compatibility tests.

  • run integration tests : Run the Agent Integration tests.

  • run end-to-end tests : Run the APM-ITs.

  • run windows tests : Build & tests on windows.

  • run elasticsearch-ci/docs : Re-trigger the docs validation. (use unformatted text in the comment!)

@SylvainJuge
SylvainJuge enabled auto-merge (squash) December 1, 2022 10:37
@SylvainJuge
SylvainJuge merged commit 58332d4 into elastic:main Dec 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants