You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@opennlp.apache.org by "jzonthemtn (via GitHub)" <gi...@apache.org> on 2023/03/04 17:45:49 UTC

[GitHub] [opennlp] jzonthemtn commented on a diff in pull request #512: OPENNLP-1476 Modernize DictionaryEntryPersistor to create XMLReader via javax.xml.parsers.SAXParserFactory

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


##########
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:
   What are the implications of 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.

To unsubscribe, e-mail: dev-unsubscribe@opennlp.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org