mirror of https://github.com/apache/lucene.git
clarify stax comments, change logging level
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@577432 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
aec2619ae0
commit
11ec236ebf
|
@ -83,12 +83,18 @@ public class XmlUpdateRequestHandler extends RequestHandlerBase
|
|||
|
||||
inputFactory = BaseXMLInputFactory.newInstance();
|
||||
try {
|
||||
// The java 1.6 bundled stax parser (sjsxp) does not currently have a thread-safe
|
||||
// XMLInputFactory, as that implementation tries to cache and reuse the
|
||||
// XMLStreamReader. Setting the parser-specific "reuse-instance" property to false
|
||||
// prevents this.
|
||||
// All other known open-source stax parsers (and the bea ref impl)
|
||||
// have thread-safe factories.
|
||||
inputFactory.setProperty("reuse-instance", Boolean.FALSE);
|
||||
}
|
||||
catch( IllegalArgumentException ex ) {
|
||||
// The java 1.5 com.bea.xml does not support this property, but behaves properly in a
|
||||
// multi-threaded environment. Ignore the error for 1.5
|
||||
log.info( "Unable to set the 'reuse-instance' property for the input factory: "+inputFactory );
|
||||
// Other implementations will likely throw this exception since "reuse-instance"
|
||||
// isimplementation specific.
|
||||
log.fine( "Unable to set the 'reuse-instance' property for the input factory: "+inputFactory );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue