nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brosander <...@git.apache.org>
Subject [GitHub] nifi-minifi pull request #21: MINIFI-41 - CLI utility for template.xml -> YA...
Date Thu, 30 Jun 2016 16:40:05 GMT
Github user brosander commented on a diff in the pull request:

    https://github.com/apache/nifi-minifi/pull/21#discussion_r69166911
  
    --- Diff: minifi-commons/minifi-commons-schema/src/main/java/org/apache/nifi/minifi/commons/schema/BaseSchema.java
---
    @@ -15,13 +15,17 @@
      * limitations under the License.
      */
     
    -package org.apache.nifi.minifi.bootstrap.util.schema.common;
    +package org.apache.nifi.minifi.commons.schema;
     
     import java.lang.reflect.Constructor;
     import java.lang.reflect.InvocationTargetException;
    +import java.util.Collections;
    +import java.util.LinkedHashMap;
     import java.util.LinkedList;
     import java.util.List;
     import java.util.Map;
    +import java.util.Set;
    +import java.util.stream.Collectors;
     
     public class BaseSchema {
    --- End diff --
    
    So I agree that the toMap method is a little light atm, the one thing I liked about defining
it in the superclass was to centralize the decision to use a LinkedHashMap (to preserve insertion
order and allow YAML to have attributes in the desired order).
    
    I figured that it was possible we would want to add common attributes at the top level
at some point in which case that would be a good place for it.
    
    In terms of the helper methods, I don't have a problem with making them static.


---
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