Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
5.4.0.CR1
-
None
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.