Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-3487

NullPointerException in org.jbpm.ruleflow.core.validation.RuleFlowProcessValidator

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 5.4.0.CR1
    • drools-core (flow)
    • None
    • Hide

      Not quite sure, but the code inspection reveals that something isn't right.

      Show
      Not quite sure, but the code inspection reveals that something isn't right.

    Description

      There is a coding issue in that leads to a NullPOinterException.
      The Exception has been shown presumable due to an invalid rf file - but the code gives an unhelpful exception.

      Insepction of the code reveals that if the first condition is true on line 193 then the code will blow up - which is presumable not what the coder has intended

      RuleFlowProcessValidator.java Line 190 onwars
                      if (split.getType() == Split.TYPE_XOR || split.getType() == Split.TYPE_OR ) {
                          for ( final Iterator<Connection> it = split.getDefaultOutgoingConnections().iterator(); it.hasNext(); ) {
                              final Connection connection = it.next();
                              if (split.getConstraint(connection) == null && !split.getConstraint(connection).isDefault() && (split.getConstraint(connection).getConstraint() == null || split.getConstraint(connection).getConstraint().trim().length() == 0)) {
                                  errors.add(new ProcessValidationErrorImpl(process,
                                      "Split node '" + node.getName() + "' [" + node.getId() + "] does not have a constraint for " + connection.toString() + "."));
                              }
                          }
                      }
      

      "if (split.getConstraint(connection) == null && !split.getConstraint(connection).isDefault()"

      if "split.gerConstraint(connection)" is null then "split.getConstraint(connection).isDefault()" will dereference null.

      Attachments

        Activity

          People

            mproctor@redhat.com Mark Proctor
            teilo. James Nord (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

            Dates

              Created:
              Updated:
              Archived:

              PagerDuty