mawiesne commented on code in PR #512:
URL: https://github.com/apache/opennlp/pull/512#discussion_r1125509350


##########
opennlp-tools/src/main/java/opennlp/tools/dictionary/serializer/DictionaryEntryPersistor.java:
##########
@@ -225,16 +226,19 @@ public void startPrefixMapping(String prefix, String uri)
   public static boolean create(InputStream in, EntryInserter inserter)
       throws IOException {
 
-    DictionaryContenthandler profileContentHandler =
-        new DictionaryContenthandler(inserter);
+    DictionaryContenthandler profileContentHandler = new 
DictionaryContenthandler(inserter);
 
     XMLReader xmlReader;
     try {
-      xmlReader = XMLReaderFactory.createXMLReader();
+      xmlReader = SAX_PARSER_FACTORY.newSAXParser().getXMLReader();
+      // Note:

Review Comment:
   Basically, from a runtime perspective: _none_. 
   
   The switch to this way of creating the XMLReader instance is kind of a 
modernization. 
   You might wanna check the JavaDoc of `XMLReaderFactory.createXMLReader()` 
for details: 
https://docs.oracle.com/en/java/javase/11/docs/api/java.xml/org/xml/sax/helpers/XMLReaderFactory.html



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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to