Author: markt
Date: Thu Aug 1 10:15:47 2013
New Revision: 1509159
URL: http://svn.apache.org/r1509159
Log:
Remove trailing whitespace
Modified:
tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java
Modified: tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java
URL:
http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java?rev=1509159&r1=1509158&r2=1509159&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java
(original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/catalina/realm/JDBCRealm.java Thu Aug
1 10:15:47 2013
@@ -5,9 +5,9 @@
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -428,7 +428,7 @@ public class JDBCRealm
}
ArrayList<String> roles = getRoles(username);
-
+
// Create and return a suitable Principal for this user
return (new GenericPrincipal(username, credentials, roles));
@@ -550,19 +550,19 @@ public class JDBCRealm
try {
// Ensure that we have an open database connection
open();
-
+
stmt = credentials(dbConnection, username);
rs = stmt.executeQuery();
dbConnection.commit();
-
+
if (rs.next()) {
dbCredentials = rs.getString(1);
}
-
+
if (dbCredentials != null) {
dbCredentials = dbCredentials.trim();
}
-
+
return dbCredentials;
} catch (SQLException e) {
@@ -583,10 +583,10 @@ public class JDBCRealm
if (dbConnection != null) {
close(dbConnection);
}
-
+
numberOfTries--;
}
-
+
return (null);
}
@@ -608,7 +608,7 @@ public class JDBCRealm
* Return the roles associated with the gven user name.
*/
protected ArrayList<String> getRoles(String username) {
-
+
if (allRolesMode != AllRolesMode.STRICT_MODE && !isRoleStoreDefined())
{
// Using an authentication only configuration and no role store has
// been defined so don't spend cycles looking
@@ -629,10 +629,10 @@ public class JDBCRealm
int numberOfTries = 2;
while (numberOfTries>0) {
try {
-
+
// Ensure that we have an open database connection
open();
-
+
try {
// Accumulate the user's roles
ArrayList<String> roleList = new ArrayList<String>();
@@ -646,9 +646,9 @@ public class JDBCRealm
}
rs.close();
rs = null;
-
+
return (roleList);
-
+
} finally {
if (rs!=null) {
try {
@@ -659,25 +659,25 @@ public class JDBCRealm
}
dbConnection.commit();
}
-
+
} catch (SQLException e) {
-
+
// Log the problem for posterity
containerLog.error(sm.getString("jdbcRealm.exception"), e);
-
+
// Close the connection so that it gets reopened next time
if (dbConnection != null)
close(dbConnection);
-
+
}
-
+
numberOfTries--;
}
-
+
return null;
}
-
-
+
+
/**
* Open (if necessary) and return a database connection for use by
* this Realm.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]