bobbylight / RSyntaxTextArea

A syntax highlighting, code folding text editor for Java Swing applications.
BSD 3-Clause "New" or "Revised" License
1.1k stars 258 forks source link

Fix #545: NPE in SyntaxView.viewToModel #560

Closed bobbylight closed 2 months ago

bobbylight commented 2 months ago

As discussed in #545, an NPE in SyntaxView is caused by a null token returned from RSyntaxDocument in certain unexpected circumstances. This method should always return non-null values.

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 74.63%. Comparing base (36b928f) to head (ad03530).

Files Patch % Lines
...a/org/fife/ui/rsyntaxtextarea/RSyntaxDocument.java 0.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #560 +/- ## ============================================ + Coverage 74.61% 74.63% +0.02% - Complexity 6878 6881 +3 ============================================ Files 178 178 Lines 30264 30264 Branches 3912 3912 ============================================ + Hits 22581 22588 +7 + Misses 5862 5855 -7 Partials 1821 1821 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.