This is an automated email from the ASF dual-hosted git repository.

matthiasblaesing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-netbeans.git


The following commit(s) were added to refs/heads/master by this push:
     new 2f4e0bb  [NETBEANS-1042] IndexOutOfBoundsException in 
BreakpointAnnotationProvider can be avoided
2f4e0bb is described below

commit 2f4e0bb6830d60cd4b92d2628a78c72049716bd1
Author: Austin Stephens <sirintellegen...@gmail.com>
AuthorDate: Fri Jul 13 10:06:26 2018 -0600

    [NETBEANS-1042] IndexOutOfBoundsException in BreakpointAnnotationProvider 
can be avoided
---
 .../debugger/jpda/projectsui/BreakpointAnnotationProvider.java        | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/debugger.jpda.projectsui/src/org/netbeans/modules/debugger/jpda/projectsui/BreakpointAnnotationProvider.java
 
b/debugger.jpda.projectsui/src/org/netbeans/modules/debugger/jpda/projectsui/BreakpointAnnotationProvider.java
index d5daf0c..7497386 100644
--- 
a/debugger.jpda.projectsui/src/org/netbeans/modules/debugger/jpda/projectsui/BreakpointAnnotationProvider.java
+++ 
b/debugger.jpda.projectsui/src/org/netbeans/modules/debugger/jpda/projectsui/BreakpointAnnotationProvider.java
@@ -412,6 +412,10 @@ public class BreakpointAnnotationProvider implements 
AnnotationProvider {
         }
         List<DebuggerBreakpointAnnotation> annotations = new 
ArrayList<DebuggerBreakpointAnnotation>();
         for (int l : lines) {
+            if (l < 1){
+                //avoid IndexOutOfBoundsException
+                continue;
+            }
             try {
                 Line line = lc.getLineSet().getCurrent(l - 1);
                 DebuggerBreakpointAnnotation annotation = new 
DebuggerBreakpointAnnotation (annotationType, line, b);


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@netbeans.apache.org
For additional commands, e-mail: commits-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to