jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From thom...@apache.org
Subject svn commit: r613892 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
Date Mon, 21 Jan 2008 14:03:04 GMT
Author: thomasm
Date: Mon Jan 21 06:03:04 2008
New Revision: 613892

URL: http://svn.apache.org/viewvc?rev=613892&view=rev
Log:
JCR-1305 JNDI data sources with BundleDbPersistenceManager: UnsupportedOperationException

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java?rev=613892&r1=613891&r2=613892&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/util/ConnectionFactory.java
Mon Jan 21 06:03:04 2008
@@ -57,7 +57,7 @@
                     // JNDI context
                     Context context = (Context) d.newInstance();
                     DataSource ds = (DataSource) context.lookup(url);
-                    if (isNullOrEmpty(user) && isNullOrEmpty(password)) {
+                    if (user == null && password == null) {
                         return ds.getConnection();
                     } else {
                         return ds.getConnection(user, password);
@@ -84,15 +84,6 @@
             }
         }
         return DriverManager.getConnection(url, user, password);
-    }
-    
-    /**
-     * Check if a String is null or empty (the length is null).
-     *
-     * @return true if it is null or empty
-     */
-    private static boolean isNullOrEmpty(String s) {
-        return s == null || s.length() == 0;
     }
 
 }



Mime
View raw message