You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/12/13 19:16:08 UTC

[GitHub] [tinkerpop] rdtr commented on a change in pull request #1230: [TINKERPOP-2320] allow pass custom XmlInputFactory when instantiating GraphMLReader

rdtr commented on a change in pull request #1230: [TINKERPOP-2320] allow pass custom XmlInputFactory when instantiating GraphMLReader
URL: https://github.com/apache/tinkerpop/pull/1230#discussion_r357793028
 
 

 ##########
 File path: gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/io/graphml/GraphMLReader.java
 ##########
 @@ -343,6 +344,7 @@ public static Builder build() {
         private String vertexLabelKey = GraphMLTokens.LABEL_V;
         private boolean strict = true;
         private long batchSize = 10000;
+        private XMLInputFactory inputFactory = XMLInputFactory.newInstance();
 
 Review comment:
   It is wasteful to always instantiate a default inputFactory considering it may not be used. Alternatively I can write in create method like:
   
   ```
           public GraphMLReader create() {
               if (this.inputFactory == null) {
                   this.inputFactory = XMLInputFactory.newInstance();
               }
               return new GraphMLReader(this);
           }
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services