cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r526699 - /cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conn/DataSourceInfo.java
Date Mon, 09 Apr 2007 10:03:26 GMT
Author: aadamchik
Date: Mon Apr  9 03:03:25 2007
New Revision: 526699

URL: http://svn.apache.org/viewvc?view=rev&rev=526699
Log:
decreasing verbosity for default password settings

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conn/DataSourceInfo.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conn/DataSourceInfo.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conn/DataSourceInfo.java?view=diff&rev=526699&r1=526698&r2=526699
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conn/DataSourceInfo.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.4-unpublished/src/main/java/org/apache/cayenne/conn/DataSourceInfo.java
Mon Apr  9 03:03:25 2007
@@ -22,6 +22,7 @@
 import java.io.Serializable;
 
 import org.apache.cayenne.conf.PasswordEncoding;
+import org.apache.cayenne.conf.PlainTextPasswordEncoder;
 import org.apache.cayenne.util.Util;
 
 /**
@@ -114,11 +115,7 @@
         buf.append("[").append(this.getClass().getName()).append(":").append(
                 "\n   user name: ").append(userName).append("\n   password: ");
 
-        if (password == null)
-            buf.append("null");
-        else
-            buf.append("**********");
-
+        buf.append("**********");
         buf
                 .append("\n   driver: ")
                 .append(jdbcDriver)
@@ -129,17 +126,19 @@
                 .append("\n   min. connections: ")
                 .append(minConnections)
                 .append("\n   max. connections: ")
-                .append(maxConnections)
-                .append("\n   encoder class: ")
-                .append(passwordEncoderClass)
-                .append("\n   encoder salt: ")
-                .append(passwordEncoderSalt)
-                .append("\n   password location: ")
-                .append(passwordLocation)
-                .append("\n   password source: ")
-                .append(getPasswordSource())
-                .append("\n]");
+                .append(maxConnections);
+
+        if (!PlainTextPasswordEncoder.class.getName().equals(passwordEncoderClass)) {
+            buf.append("\n   encoder class: ").append(passwordEncoderClass).append(
+                    "\n   encoder salt: ").append(passwordEncoderSalt);
+        }
+
+        if (!PASSWORD_LOCATION_MODEL.equals(passwordLocation)) {
+            buf.append("\n   password location: ").append(passwordLocation).append(
+                    "\n   password source: ").append(getPasswordSource());
+        }
 
+        buf.append("\n]");
         return buf.toString();
     }
 



Mime
View raw message