You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openwebbeans.apache.org by rm...@apache.org on 2020/10/26 18:15:00 UTC
[openwebbeans] branch master updated: [MEECROWAVE-264] ensure we
don't init the propertyloader logger and skip it when used in standalone
mode
This is an automated email from the ASF dual-hosted git repository.
rmannibucau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/openwebbeans.git
The following commit(s) were added to refs/heads/master by this push:
new d33c61c [MEECROWAVE-264] ensure we don't init the propertyloader logger and skip it when used in standalone mode
d33c61c is described below
commit d33c61cf1fa2e25fe8e6cde99bda7854e2bee545
Author: Romain Manni-Bucau <rm...@gmail.com>
AuthorDate: Mon Oct 26 19:14:55 2020 +0100
[MEECROWAVE-264] ensure we don't init the propertyloader logger and skip it when used in standalone mode
---
.../src/main/java/org/apache/webbeans/config/PropertyLoader.java | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java b/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java
index 0b46eb0..f96f04b 100644
--- a/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java
+++ b/webbeans-impl/src/main/java/org/apache/webbeans/config/PropertyLoader.java
@@ -103,8 +103,7 @@ public final class PropertyLoader
private static void onMissingConfiguration(final String propertyFileName)
{
- final Logger logger = getLogger();
- if (logger.isLoggable(Level.INFO))
+ if (logger != null && logger.isLoggable(Level.INFO))
{
logger.info("could not find any property files with name " + propertyFileName);
}
@@ -119,7 +118,6 @@ public final class PropertyLoader
public static List<Properties> loadAllProperties(String propertyFileName, Runnable onMissing)
throws IOException
{
- final Logger logger = getLogger();
ClassLoader cl = WebBeansUtil.getCurrentClassLoader();
Enumeration<URL> propertyUrls = cl.getResources(propertyFileName);
if (propertyUrls == null || !propertyUrls.hasMoreElements())
@@ -141,7 +139,7 @@ public final class PropertyLoader
// a bit debugging output
int ordinal = getConfigurationOrdinal(prop);
- if (logger.isLoggable(Level.FINE))
+ if (logger != null && logger.isLoggable(Level.FINE))
{
logger.fine("loading properties with ordinal " + ordinal + " from file " + propertyUrl.getFile());
}