Author: kwall
Date: Thu Apr 23 15:51:23 2015
New Revision: 1675661

URL: http://svn.apache.org/r1675661
Log:
QPID-6496: [Java Client] removed logging of initial context properties to 
prevent logging of password.

work done by Lorenz Quack <[email protected]>

Modified:
    
qpid/java/trunk/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java

Modified: 
qpid/java/trunk/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java
URL: 
http://svn.apache.org/viewvc/qpid/java/trunk/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java?rev=1675661&r1=1675660&r2=1675661&view=diff
==============================================================================
--- 
qpid/java/trunk/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java
 (original)
+++ 
qpid/java/trunk/client/src/main/java/org/apache/qpid/jndi/PropertiesFileInitialContextFactory.java
 Thu Apr 23 15:51:23 2015
@@ -70,15 +70,13 @@ public class PropertiesFileInitialContex
     {
         Map data = new ConcurrentHashMap();
         BufferedInputStream inputStream = null;
+        String fileName = (environment.containsKey(Context.PROVIDER_URL))
+                ? (String)environment.get(Context.PROVIDER_URL) : 
System.getProperty(Context.PROVIDER_URL);
         try
         {
-
-            String fileName = (environment.containsKey(Context.PROVIDER_URL))
-                    ? (String)environment.get(Context.PROVIDER_URL) : 
System.getProperty(Context.PROVIDER_URL);
-
             if (fileName != null)
             {
-                _logger.info("Attempting to load " + fileName);
+                _logger.debug("Attempting to load " + fileName);
 
                 inputStream = new BufferedInputStream(new 
FileInputStream((fileName.contains("file:"))
                                                      ? new File(new 
URI(fileName)) : new File(fileName)));
@@ -99,22 +97,21 @@ public class PropertiesFileInitialContex
                         System.setProperty(key, expanded);
                     }
                 }
-                _logger.info("Loaded Context Properties:" + 
environment.toString());
             }
             else
             {
-                _logger.info("No Provider URL specified.");
+                _logger.debug("No Provider URL specified.");
             }
         }
         catch (IOException ioe)
         {
-            _logger.warn("Unable to load property file specified in 
Provider_URL:" + environment.get(Context.PROVIDER_URL) +"\n" +
+            _logger.warn("Unable to load property file specified in 
Provider_URL:" + fileName +"\n" +
                          "Due to:" + ioe.getMessage());
         }
         catch(URISyntaxException uoe)
         {
-            _logger.warn("Unable to load property file specified in 
Provider_URL:" + environment.get(Context.PROVIDER_URL) +"\n" +
-                            "Due to:" + uoe.getMessage());
+            _logger.warn("Unable to load property file specified in 
Provider_URL:" + fileName +"\n" +
+                         "Due to:" + uoe.getMessage());
         }
         finally
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to