mpoeschl 02/05/07 10:23:07
Modified: src/java/org/apache/torque Torque.java
Log:
coding conventions
Revision Changes Path
1.57 +18 -19 jakarta-turbine-torque/src/java/org/apache/torque/Torque.java
Index: Torque.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-torque/src/java/org/apache/torque/Torque.java,v
retrieving revision 1.56
retrieving revision 1.57
diff -u -r1.56 -r1.57
--- Torque.java 2 May 2002 16:47:31 -0000 1.56
+++ Torque.java 7 May 2002 17:23:07 -0000 1.57
@@ -64,7 +64,6 @@
import java.util.ArrayList;
import java.util.Collections;
import java.util.Properties;
-import org.apache.commons.lang.exception.NestableException;
import org.apache.log4j.Category;
import org.apache.log4j.PropertyConfigurator;
import org.apache.log4j.helpers.NullEnumeration;
@@ -91,7 +90,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Jason van Zyl</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Rafal Krzewski</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Martin Poeschl</a>
- * @version $Id: Torque.java,v 1.56 2002/05/02 16:47:31 jmcnally Exp $
+ * @version $Id: Torque.java,v 1.57 2002/05/07 17:23:07 mpoeschl Exp $
*/
public class Torque implements Initializable, Configurable
{
@@ -228,14 +227,14 @@
for (Iterator i = mapBuilders.iterator(); i.hasNext(); )
{
//this will add any maps in this builder to the proper database map
- BasePeer.getMapBuilder((String)i.next());
+ BasePeer.getMapBuilder((String) i.next());
}
// any further mapBuilders will be called/built on demand
mapBuilders = null;
// setup manager mappings
initManagerMappings(configuration);
-
+
// Create monitor thread
monitor = new Monitor();
// Indicate that this is a system thread. JVM will quit only when there
@@ -271,7 +270,8 @@
{
try
{
- Configuration c = (Configuration)new
PropertiesConfiguration(configFile);
+ Configuration c = (Configuration)
+ new PropertiesConfiguration(configFile);
init(c);
}
catch (IOException e)
@@ -324,17 +324,18 @@
Iterator keys = configuration.getKeys();
- while(keys.hasNext())
+ while (keys.hasNext())
{
- String key = (String)keys.next();
+ String key = (String) keys.next();
- if(key.startsWith(MANAGER_PREFIX) && key.endsWith(CLASSNAME_SUFFIX))
+ if (key.startsWith(MANAGER_PREFIX)
+ && key.endsWith(CLASSNAME_SUFFIX))
{
String managerKey = key.substring(pref, key.length() - suff);
- if (! managers.containsKey(managerKey))
+ if (!managers.containsKey(managerKey))
{
String managerClass = configuration.getString(key);
- category.info("Added Mapping for Manager: " + managerKey
+ category.info("Added Mapping for Manager: " + managerKey
+ " -> " + managerClass);
try
{
@@ -344,7 +345,7 @@
{
// the exception thrown here seems to disappear.
// At least when initialized by Turbine, should find
- // out why, but for now make sure it is noticed.
+ // out why, but for now make sure it is noticed.
category.error(e);
e.printStackTrace();
throw e;
@@ -507,8 +508,8 @@
}
else
{
- Enumeration cats = Category.getCurrentCategories();
- while(cats.hasMoreElements())
+ Enumeration cats = Category.getCurrentCategories();
+ while (cats.hasMoreElements())
{
Category c = (Category) cats.nextElement();
if (!(c.getAllAppenders() instanceof NullEnumeration))
@@ -517,7 +518,6 @@
}
}
}
-
return false;
}
@@ -529,7 +529,7 @@
*/
public static AbstractBaseManager getManager(String name)
{
- return (AbstractBaseManager)managers.get(name);
+ return (AbstractBaseManager) managers.get(name);
}
/**
@@ -562,7 +562,7 @@
{
try
{
- ((ConnectionPool)pool.next()).shutdown();
+ ((ConnectionPool) pool.next()).shutdown();
}
catch (Exception ignored)
{
@@ -570,7 +570,6 @@
}
}
}
-
// shutdown the thread
monitor = null;
}
@@ -978,7 +977,7 @@
* {@link #registerPool(String,String,String,String,String)} method, or be
* specified in the TurbineResources properties. This method is used
* internally by the service. Under normal usage it would not be used
- * in application code, but is public in the event the pool must be
+ * in application code, but is public in the event the pool must be
* accessed directly, such as to shutdown an individual pool.
*
* @param name The name of the pool to get.
@@ -1057,7 +1056,7 @@
{
public void run()
{
- int logInterval = configuration.getInt("database.logInterval",0);
+ int logInterval = configuration.getInt("database.logInterval", 0);
StringBuffer buf = new StringBuffer();
while (logInterval > 0)
{
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>