From issues-return-6020-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Tue Dec 3 22:59:59 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 393FF180629 for ; Tue, 3 Dec 2019 23:59:59 +0100 (CET) Received: (qmail 21430 invoked by uid 500); 3 Dec 2019 22:59:58 -0000 Mailing-List: contact issues-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list issues@lucene.apache.org Received: (qmail 21411 invoked by uid 99); 3 Dec 2019 22:59:58 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Dec 2019 22:59:58 +0000 From: GitBox To: issues@lucene.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 Message-ID: <157541399845.5702.3070467957367268284.gitbox@gitbox.apache.org> Date: Tue, 03 Dec 2019 22:59:58 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit 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