Github user woonsan commented on a diff in the pull request:
https://github.com/apache/commons-scxml/pull/2#discussion_r72977815
--- Diff: src/main/java/org/apache/commons/scxml2/io/SCXMLReader.java ---
@@ -1094,7 +1094,21 @@ private static void readData(final XMLStreamReader
reader, final Configuration c
Data datum = new Data();
datum.setId(readRequiredAV(reader, ELEM_DATA, ATTR_ID));
- datum.setExpr(readAV(reader, ATTR_EXPR));
+ final String expr = readAV(reader, ATTR_EXPR);
+ final String src = readAV(reader, ATTR_SRC);
+
+ if (expr != null && src != null) {
+ LogFactory.getLog(SCXMLReader.class).error(
+ "Found src and expr attributes for data node '" +
datum.getId() + "', which is not valid SCXML.");
+ throw new ModelException();
+ }
+ if (expr != null) {
+ datum.setExpr(expr);
+ }
+ if (src != null) {
+ datum.setSrc(src);
--- End diff --
it's minor, but our indentation rule is 4 spaces. ;-)
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---