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 2020/11/16 15:25:08 UTC
[logging-log4j2] branch release-2.x updated: Add and document
@SuppressWarnings.
This is an automated email from the ASF dual-hosted git repository.
ggregory pushed a commit to branch release-2.x
in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
The following commit(s) were added to refs/heads/release-2.x by this push:
new 4ef7fe8 Add and document @SuppressWarnings.
4ef7fe8 is described below
commit 4ef7fe81dc7ad922bb29dd79f00b2460b63c4646
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Mon Nov 16 10:25:02 2020 -0500
Add and document @SuppressWarnings.
---
log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java | 1 +
1 file changed, 1 insertion(+)
diff --git a/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java b/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java
index 1c8436d..989f9a8 100644
--- a/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java
+++ b/log4j-1.2-api/src/main/java/org/apache/log4j/xml/XmlConfiguration.java
@@ -125,6 +125,7 @@ public class XmlConfiguration extends Log4j1Configuration {
ParseAction action = new ParseAction() {
@Override
public Document parse(final DocumentBuilder parser) throws SAXException, IOException {
+ @SuppressWarnings("resource") // The ConfigurationSource manages the InputStream.
InputSource inputSource = new InputSource(source.getInputStream());
inputSource.setSystemId("dummy://log4j.dtd");
return parser.parse(inputSource);