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/26 14:07:07 UTC

[logging-log4j2] 04/05: If not needed.

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

commit 4f9c6cfcae3e2e214292a4b51f3e2ca0542538c4
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 22 14:31:06 2020 -0500

    If not needed.
---
 .../org/apache/logging/log4j/core/config/ConfigurationSource.java   | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationSource.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationSource.java
index 05382f1..3de940b 100644
--- a/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationSource.java
+++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/config/ConfigurationSource.java
@@ -321,11 +321,7 @@ public class ConfigurationSource {
         if (ConfigurationFactory.isClassLoaderUri(configLocation)) {
             final ClassLoader loader = LoaderUtil.getThreadContextClassLoader();
             final String path = ConfigurationFactory.extractClassLoaderUriPath(configLocation);
-            final ConfigurationSource source = fromResource(path, loader);
-            if (source != null) {
-                return source;
-            }
-            return null;
+            return fromResource(path, loader);
         }
         if (!configLocation.isAbsolute()) { // LOG4J2-704 avoid confusing error message thrown by uri.toURL()
             ConfigurationFactory.LOGGER.error("File not found in file system or classpath: {}", configLocation.toString());