Github user stain commented on a diff in the pull request:

    
https://github.com/apache/incubator-taverna-language/pull/39#discussion_r201983228
  
    --- Diff: 
taverna-scufl2-cwl/src/main/java/org/apache/taverna/scufl2/cwl/WorkflowParser.java
 ---
    @@ -67,6 +68,12 @@ public WorkflowParser() {
             JsonNode cwlFile = 
mapper.valueToTree(reader.load(WorkflowParser.class.getResourceAsStream(FILE_NAME)));
             this.cwlParser = new CWLParser(cwlFile);
             this.converter = new Converter();
    +        workflowInputs = new HashMap<>();
    --- End diff --
    
    I don't know why these collections have to be created as part of this 
constructor, rather move that out to each of their field definitions.
    
    It makes sense to do it in the constructor instead if you have multiple 
constructors that do it differently, say by passing in values; or if it's 
complex objects that are intra-connected, as the order of the field 
constructors is easy to change by accident. But for simple `HashMap` then they 
can be created in any order as I don't think anything else in the constructor 
expects them to pre-exist.


---

Reply via email to