javatlacati opened a new issue, #5128:
URL: https://github.com/apache/netbeans/issues/5128
### Apache NetBeans version
Apache NetBeans 16
### What happened
A javax.swing.text.BadLocationException exception has occurred while editing
some code and playing with java streams API.
### How to reproduce
```
javax.swing.text.BadLocationException: Invalid offset=777 not within <0, 776>
at
org.netbeans.modules.editor.lib2.DocUtils.checkOffsetValid(DocUtils.java:214)
at
org.netbeans.modules.editor.lib2.DocUtils.checkOffsetValid(DocUtils.java:209)
at
org.netbeans.modules.editor.lib2.DocUtils.getRowStart(DocUtils.java:45)
[catch] at
org.netbeans.modules.editor.lib2.highlighting.CaretBasedBlockHighlighting$CaretRowHighlighting.getCurrentBlockPositions(CaretBasedBlockHighlighting.java:278)
at
org.netbeans.modules.editor.lib2.highlighting.CaretBasedBlockHighlighting.updateLineInfo(CaretBasedBlockHighlighting.java:191)
at
org.netbeans.modules.editor.lib2.highlighting.CaretBasedBlockHighlighting.stateChanged(CaretBasedBlockHighlighting.java:179)
at
org.openide.util.WeakListenerImpl$Change.stateChanged(WeakListenerImpl.java:331)
at
org.netbeans.api.editor.caret.EditorCaret$6.run(EditorCaret.java:1733)
at
java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at
java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:773)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:720)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:714)
at
java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at
java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at
org.netbeans.core.TimableEventQueue.dispatchEvent(TimableEventQueue.java:136)
at
java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at
java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at
java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at
java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at
java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
```
### Did this work correctly in an earlier version?
No / Don't know
### Operating System
windows 10
### JDK
Java: 18.0.2; OpenJDK 64-Bit Server VM 18.0.2+9-61
### Apache NetBeans packaging
Apache NetBeans provided installer
### Anything else
_No response_
### Are you willing to submit a pull request?
Yes
### Code of Conduct
Yes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists