You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@netbeans.apache.org by ne...@apache.org on 2021/11/10 11:33:18 UTC

[netbeans] branch delivery updated: Fix of NPE in TruffleAccess.

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

neilcsmith pushed a commit to branch delivery
in repository https://gitbox.apache.org/repos/asf/netbeans.git


The following commit(s) were added to refs/heads/delivery by this push:
     new 516f21b  Fix of NPE in TruffleAccess.
     new 0c613d1  Merge pull request #3312 from entlicher/TruffleAccessNPE_delivery
516f21b is described below

commit 516f21ba3f1085371d80d571fa9fa4ef437950b8
Author: Martin Entlicher <ma...@oracle.com>
AuthorDate: Tue Nov 9 11:04:53 2021 +0100

    Fix of NPE in TruffleAccess.
---
 .../netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
index 7730a71..c45511e 100644
--- a/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
+++ b/java/debugger.jpda.truffle/src/org/netbeans/modules/debugger/jpda/truffle/access/TruffleAccess.java
@@ -457,10 +457,11 @@ public class TruffleAccess implements JPDABreakpointListener {
     private static HitBreakpointInfo[] getBreakpointInfos(ExecutionHaltedInfo haltedInfo, JPDAThread thread) {
         ObjectVariable[] breakpointsHit = haltedInfo.breakpointsHit;
         ObjectVariable[] breakpointConditionExceptions = haltedInfo.breakpointConditionExceptions;
-        int n = breakpointsHit.length;
+        int n = (breakpointsHit != null) ? breakpointsHit.length : 0;
         HitBreakpointInfo[] breakpointInfos = null;
         for (int i = 0; i < n; i++) {
-            HitBreakpointInfo breakpointInfo = HitBreakpointInfo.create(breakpointsHit[i], breakpointConditionExceptions[i]);
+            ObjectVariable exception = (breakpointConditionExceptions != null) ? breakpointConditionExceptions[i] : null;
+            HitBreakpointInfo breakpointInfo = HitBreakpointInfo.create(breakpointsHit[i], exception);
             if (breakpointInfo != null) {
                 if (breakpointInfos == null) {
                     breakpointInfos = new HitBreakpointInfo[] { breakpointInfo };

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

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