From 849e1c082ad3251da292bedbc25d9b79435a1d8e Mon Sep 17 00:00:00 2001 From: Francisco Javier Tirado Sarti <65240126+fjtirado@users.noreply.github.com> Date: Thu, 5 Oct 2023 11:03:17 +0200 Subject: [PATCH] [JBPM-10203] Fixing null pointer exception for cancelActivity (#2342) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [JBPM-10203] Fixing null pointer exception for cancelActivity * Update jbpm-bpmn2/src/main/java/org/jbpm/bpmn2/xml/BoundaryEventHandler.java Co-authored-by: Gonzalo Muñoz --------- Co-authored-by: Gonzalo Muñoz --- .../src/main/java/org/jbpm/bpmn2/xml/BoundaryEventHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jbpm-bpmn2/src/main/java/org/jbpm/bpmn2/xml/BoundaryEventHandler.java b/jbpm-bpmn2/src/main/java/org/jbpm/bpmn2/xml/BoundaryEventHandler.java index 58d30e184b..e62428a2e6 100644 --- a/jbpm-bpmn2/src/main/java/org/jbpm/bpmn2/xml/BoundaryEventHandler.java +++ b/jbpm-bpmn2/src/main/java/org/jbpm/bpmn2/xml/BoundaryEventHandler.java @@ -59,7 +59,7 @@ public Object end(final String uri, final String localName, Node node = (Node) parser.getCurrent(); String attachedTo = element.getAttribute("attachedToRef"); Attr cancelActivityAttr = element.getAttributeNode("cancelActivity"); - boolean cancelActivity = Boolean.parseBoolean(cancelActivityAttr.getValue()); + boolean cancelActivity = cancelActivityAttr == null || Boolean.parseBoolean(cancelActivityAttr.getValue()); // determine type of event definition, so the correct type of node can be generated org.w3c.dom.Node xmlNode = element.getFirstChild();