Removed DOCUMENT ME comments that were generated and applied source code
[utils] / test / enterprise / src / main / java / org / wamblee / support / jndi / StubInitialContextFactory.java
index c7e4e2fde323bd3c390cebcf8b59dde3adf24b73..23d3cf6eec265f0f15b497673fd12a6d00e526e3 100644 (file)
@@ -23,41 +23,41 @@ import javax.naming.spi.InitialContextFactory;
  */
 public class StubInitialContextFactory implements InitialContextFactory {
 
-       private static Context context;
-
-       private static void initialize() {
-               try {
-                       context = new StubInitialContext();
-               } catch (NamingException e) { // can't happen.
-                       throw new RuntimeException(e);
-               }
-       }
-
-       /**
-        * This method must be called to register this initial context factory as
-        * the default implementation for JNDI.
-        
-        * @throws Exception
-        */
-       public static void register() {
-               // sets up the InitialContextFactoryForTest as default factory.
-               System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
-                               StubInitialContextFactory.class.getName());
-               if (context == null) {
-                       initialize();
-               }
-       }
-       
-       /**
-        * Unregisters the initial context factory 
-        */
-       public static void unregister() { 
-               System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "");
-               context = null; 
-       }
-
-       public Context getInitialContext(Hashtable<?, ?> environment)
-                       throws NamingException {
-               return context;
-       }
+    private static Context context;
+
+    private static void initialize() {
+        try {
+            context = new StubInitialContext();
+        } catch (NamingException e) { // can't happen.
+            throw new RuntimeException(e);
+        }
+    }
+
+    /**
+     * This method must be called to register this initial context factory as
+     * the default implementation for JNDI.
+     * 
+     * @throws Exception
+     */
+    public static void register() {
+        // sets up the InitialContextFactoryForTest as default factory.
+        System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
+            StubInitialContextFactory.class.getName());
+        if (context == null) {
+            initialize();
+        }
+    }
+
+    /**
+     * Unregisters the initial context factory
+     */
+    public static void unregister() {
+        System.setProperty(Context.INITIAL_CONTEXT_FACTORY, "");
+        context = null;
+    }
+
+    public Context getInitialContext(Hashtable<?, ?> environment)
+        throws NamingException {
+        return context;
+    }
 }