You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2014/08/27 23:08:24 UTC
svn commit: r1620982 -
/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
Author: ggregory
Date: Wed Aug 27 21:08:24 2014
New Revision: 1620982
URL: http://svn.apache.org/r1620982
Log:
Better ivar name and don't hide an ivar with an lvar.
Modified:
logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
Modified: logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java
URL: http://svn.apache.org/viewvc/logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java?rev=1620982&r1=1620981&r2=1620982&view=diff
==============================================================================
--- logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java (original)
+++ logging/log4j/log4j2/trunk/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java Wed Aug 27 21:08:24 2014
@@ -72,7 +72,7 @@ public class XmlConfiguration extends Ab
private final List<Status> status = new ArrayList<Status>();
private Element rootElement;
private boolean strict;
- private String schema;
+ private String schemaResource;
/**
* Creates a new DocumentBuilder suitable for parsing a configuration file.
@@ -159,7 +159,7 @@ public class XmlConfiguration extends Ab
} else if ("strict".equalsIgnoreCase(key)) {
strict = Boolean.parseBoolean(value);
} else if ("schema".equalsIgnoreCase(key)) {
- schema = value;
+ schemaResource = value;
} else if ("monitorInterval".equalsIgnoreCase(key)) {
final int interval = Integer.parseInt(value);
if (interval > 0 && configFile != null) {
@@ -177,12 +177,12 @@ public class XmlConfiguration extends Ab
} catch (final ParserConfigurationException pex) {
LOGGER.error("Error parsing {}", configSource.getLocation(), pex);
}
- if (strict && schema != null && buffer != null) {
+ if (strict && schemaResource != null && buffer != null) {
InputStream is = null;
try {
- is = Loader.getResourceAsStream(schema, XmlConfiguration.class.getClassLoader());
+ is = Loader.getResourceAsStream(schemaResource, XmlConfiguration.class.getClassLoader());
} catch (final Exception ex) {
- LOGGER.error("Unable to access schema {}", this.schema, ex);
+ LOGGER.error("Unable to access schema {}", this.schemaResource, ex);
}
if (is != null) {
final Source src = new StreamSource(is, LOG4J_XSD);