[cvs] expresso commit by rimovm: Checkstyle errors removed Javadoc errors

JCorporate Ltd jcorp at jcorp2.servlets.net
Mon Nov 15 13:01:16 PST 2004


Log Message:
-----------
Checkstyle errors removed
Javadoc errors removed.

Modified Files:
--------------
    expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/test:
        SchemaDeleter.java

Revision Data
-------------
Index: SchemaDeleter.java
===================================================================
RCS file: /home/javacorp/.cvs/expresso/expresso/expresso-web/WEB-INF/src/com/jcorporate/expresso/services/test/SchemaDeleter.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/test/SchemaDeleter.java -Lexpresso-web/WEB-INF/src/com/jcorporate/expresso/services/test/SchemaDeleter.java -u -r1.10 -r1.11
--- expresso-web/WEB-INF/src/com/jcorporate/expresso/services/test/SchemaDeleter.java
+++ expresso-web/WEB-INF/src/com/jcorporate/expresso/services/test/SchemaDeleter.java
@@ -83,6 +83,10 @@
      * List of Schemas to run through the delete process.
      */
     private static Vector theSchemas = null;
+
+    /**
+     * The data context.
+     */
     static String dataContext = null;
 
     /**
@@ -93,23 +97,27 @@
     }
 
     /**
+     * Set the data context.
      *
-     *
-     * @param newValue
+     * @param newValue the data context value.
      */
-    public void setDataContext(String newValue)
+    public void setDataContext(final String newValue)
     {
-        dataContext = newValue;
+        synchronized(SchemaDeleter.class) {
+            dataContext = newValue;
+        }
     }
 
     /**
+     * Retrieve the currently set data context.
      *
-     *
-     * @return
+     * @return the data context.
      */
     public String getDataContext()
     {
-        return dataContext;
+        synchronized(SchemaDeleter.class) {
+            return dataContext;
+        }
     }
 
     /**
@@ -119,16 +127,18 @@
      */
     public static void setSchemas(Vector v)
     {
-        theSchemas = v;
+        synchronized(SchemaDeleter.class) {
+            theSchemas = v;
+        }
     }
 
     /**
+     * Deletes a schema from the given data context.
      *
-     *
-     * @param dbName
-     * @param oneSchema
+     * @param dbName the data context.
+     * @param oneSchema the schema to delete.
      */
-    public static void deleteSchema(String dbName, Schema oneSchema)
+    public static void deleteSchema(final String dbName, final Schema oneSchema)
     {
         Vector v = new Vector();
         v.add(oneSchema);
@@ -146,27 +156,20 @@
      * @param dbName db to delete the schema from.  If the parameter is null,
      *        then the schema will be removed from the default db.
      */
-    public static void deleteSchemas(String dbName)
+    public static void deleteSchemas(final String dbName)
     {
-        if (theSchemas != null) {
-            // Start with a fresh db - wipe out all schemas.
-            //
-            try {
-                DBTool.deleteSchema(null, dbName, theSchemas);
-            } catch (DBException e) {
-                //Ignore DBExceptions
-            } catch (HtmlException he) {
-                //Ignore HTMLExceptions
+        synchronized(SchemaDeleter.class) {
+            if (theSchemas != null) {
+                // Start with a fresh db - wipe out all schemas.
+                //
+                try {
+                    DBTool.deleteSchema(null, dbName, theSchemas);
+                } catch (DBException e) {
+                    //Ignore DBExceptions
+                } catch (HtmlException he) {
+                    //Ignore HTMLExceptions
+                }
             }
-        }
-    }
-
-    private static String getMyContext()
-    {
-        if (dataContext == null) {
-            return TestSystemInitializer.getTestContext();
-        } else {
-            return dataContext;
         }
     }
 }


More information about the cvs mailing list