commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From woonsan <...@git.apache.org>
Subject [GitHub] commons-scxml pull request #2: SCXML-251: Parse src attribute of data elemen...
Date Mon, 01 Aug 2016 13:32:49 GMT
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message