Author: deepal
Date: Thu Jan 3 21:32:29 2008
New Revision: 11825
Log:
few code cleanup
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/config/RegistryConfiguration.java
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/config/RegistryConfiguration.java
==============================================================================
---
trunk/registry/modules/core/src/main/java/org/wso2/registry/config/RegistryConfiguration.java
(original)
+++
trunk/registry/modules/core/src/main/java/org/wso2/registry/config/RegistryConfiguration.java
Thu Jan 3 21:32:29 2008
@@ -34,7 +34,6 @@
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
-import java.io.File;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
@@ -101,7 +100,7 @@
// create the in-process database
- RegistryDataSource dataSource = null;
+ RegistryDataSource dataSource;
try {
dataSource = new RegistryDataSource(
dataBaseConfiguration.getDbUrl(),
@@ -234,7 +233,6 @@
private String getDBURL(ServletConfig config) {
String webinf = config.getServletContext().getRealPath("/WEB-INF");
- String dbURL = "jdbc:hsqldb:" + webinf +
"/sample/sample-db;shutdown=true";
- return dbURL;
+ return "jdbc:hsqldb:" + webinf + "/sample/sample-db;shutdown=true";
}
}
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
==============================================================================
---
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
(original)
+++
trunk/registry/modules/core/src/main/java/org/wso2/registry/jdbc/JDBCRegistry.java
Thu Jan 3 21:32:29 2008
@@ -76,7 +76,7 @@
* instances.
*
* @param dataSource Data source to be used to store resources and
metadata.
- * @throws RegistryException
+ * @throws RegistryException : If something went wrong while init
*/
public JDBCRegistry(DataSource dataSource) throws RegistryException {
this.dataSource = dataSource;
@@ -93,7 +93,7 @@
* use a realm instance constructed using the
RegistryRealmFactory. All initial
* users, roles and authorizations will be set on realms
obtained using the
* RegistryRealmFactory.
- * @throws RegistryException
+ * @throws RegistryException : If something went wrong
*/
public JDBCRegistry(DataSource dataSource, Realm realm) throws
RegistryException {
this.dataSource = dataSource;
@@ -106,7 +106,7 @@
*
* @param dataSource the DataSource to use
* @param realm Realm to use
- * @throws RegistryException
+ * @throws RegistryException : If something went wrong while init
*/
public void configure(DataSource dataSource, RegistryRealm realm) throws
RegistryException {
this.dataSource = dataSource;
Modified:
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java
==============================================================================
---
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java
(original)
+++
trunk/registry/modules/core/src/main/java/org/wso2/registry/secure/SecureRegistry.java
Thu Jan 3 21:32:29 2008
@@ -352,12 +352,11 @@
authorizedEnListList.add(allEntries[i]);
}
} catch (UserManagerException e) {
- continue;
+ //TODO Need to log what happen here
}
}
- LogEntry[] authorizedLogs = (LogEntry[]) authorizedEnListList.
+ return (LogEntry[]) authorizedEnListList.
toArray(new LogEntry[authorizedEnListList.size()]);
- return authorizedLogs;
}
}
_______________________________________________
Registry-dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/registry-dev