lucene-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [lucene-solr] dsmiley commented on a change in pull request #1050: SOLR-13990: Switch out woodstox-core-asl with aalto-xml and upgrade woodstox stax-2 API
Date Tue, 03 Dec 2019 22:59:58 GMT
dsmiley commented on a change in pull request #1050: SOLR-13990: Switch out woodstox-core-asl
with aalto-xml and upgrade woodstox stax-2 API
URL: https://github.com/apache/lucene-solr/pull/1050#discussion_r353465586
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/handler/tagger/XmlOffsetCorrector.java
 ##########
 @@ -47,19 +45,13 @@
 
   //TODO use StAX without hard requirement on woodstox.   xmlStreamReader.getLocation().getCharacterOffset()
 
-  private static final XMLInputFactory2 XML_INPUT_FACTORY;
+  private static final XMLInputFactory XML_INPUT_FACTORY;
   static {
     // note: similar code in Solr's EmptyEntityResolver
-    XML_INPUT_FACTORY = new WstxInputFactory();
-    XML_INPUT_FACTORY.setXMLResolver(new XMLResolver() {
-      @Override
-      public InputStream resolveEntity(String publicId, String systemId, String baseURI,
String namespace) {
-        return ClosedInputStream.CLOSED_INPUT_STREAM;
-      }
-    });
+    XML_INPUT_FACTORY = XMLInputFactory2.newFactory();
+    XML_INPUT_FACTORY.setXMLResolver((publicId, systemId, baseURI, namespace) -> ClosedInputStream.CLOSED_INPUT_STREAM);
 
 Review comment:
   This is a slight bit of tech debt; just use Solr's EmptyEntityResolver and then also remove
the comment.  This code pre-dated inclusion of Solr; it used to be a side project.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org


Mime
View raw message