Skip to content

Conversation

@mbien
Copy link
Member

@mbien mbien commented Mar 7, 2025

  • scanner will skip the file and log a warning
  • search will add it to the regular search result error list

cleanup:

  • removed unused UI component of search results window
  • simplified exception handling in Source#createSnapshot

image

indexer log:

WARNING [org.netbeans.modules.parsing.api.Source]: Can't create snapshot of /tmp/mavenproject1/src/main/java/com/mycompany/mavenproject1/error_file2.xml@cbec52aa:59023f9d, mimeType=text/xml. CoderMalfunctionError: java.lang.IllegalArgumentException: newPosition > limit: (1 > 0)

fixes #3842
fixes #4354
fixes #4762
fixes #6671
fixes #7839

@mbien mbien added Editor ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) labels Mar 7, 2025
@mbien mbien added this to the NB26 milestone Mar 7, 2025
@mbien mbien linked an issue Mar 7, 2025 that may be closed by this pull request
@mbien
Copy link
Member Author

mbien commented Mar 7, 2025

note that multi-line search uses different code paths (BufferedCharSequence) which checks CoderResult#isError. This already skips the file correctly and puts it onto the error list. The single line matcher doesn't do that.

Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only eyeballed this, but the screenshot looks good, the same goes for the change to code.
I have left a minor comment inline, but that does not block merging.

I think the real problem lies deeper, but last time I looked into this, I went out without a clear conclusion, so I think this improves things.

Thank you.

 - scanner will skip the file and log a warning
 - search will add it to the regular search result error list

cleanup

 - removed unused UI component
 - simplified exception handling in Source#createSnapshot
@mbien mbien force-pushed the defend-against-coder-malfunction branch from 9efef6d to e45a181 Compare March 7, 2025 21:32
Copy link
Contributor

@matthiasblaesing matthiasblaesing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you looks still sane 👍

@mbien mbien merged commit 805dc88 into apache:master Mar 8, 2025
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:dev-build [ci] produce a dev-build zip artifact (7 days expiration, see link on workflow summary page) Editor

Projects

None yet

2 participants