Skip to content

Conversation

@playdohface
Copy link
Contributor

As noted by @mfussenegger in #609 it's probably more correct and in the spirit of the spec to keep the source as null when it is not unavailable instead of setting it to a special value, especially since it would break nvim-dap otherwise.

@chagong
Copy link
Contributor

chagong commented Nov 24, 2025

LGTM.

@chagong chagong merged commit b62897e into microsoft:main Nov 24, 2025
4 checks passed
mfussenegger added a commit to mfussenegger/java-debug that referenced this pull request Dec 4, 2025
Follow up to:

- microsoft#614
- microsoft#609

With the change to set the line number to 0 the jdiLineNumber !=
lspFrame.line comparison can evaluate to true:

    dap> lspFrame
    Types$StackFrame@78
      column: 1
      id: 6
      line: 0
      name: "0x000000002f0bc000.invokeVirtual(Object,Object)"
      presentationHint: "subtle"
      source: null

    dap> jdiLineNumber
    -1

`source` being null caused an NPE
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 this pull request may close these issues.

2 participants