Tab police in org.apache.catalina
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 24 Jul 2010 10:17:45 +0000 (10:17 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 24 Jul 2010 10:17:45 +0000 (10:17 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@978840 13f79535-47bb-0310-9956-ffa450edef68

39 files changed:
java/org/apache/catalina/core/ApplicationContextFacade.java
java/org/apache/catalina/core/ApplicationHttpRequest.java
java/org/apache/catalina/core/DefaultInstanceManager.java
java/org/apache/catalina/core/StandardContext.java
java/org/apache/catalina/core/StandardHost.java
java/org/apache/catalina/core/StandardPipeline.java
java/org/apache/catalina/core/StandardWrapper.java
java/org/apache/catalina/core/StandardWrapperValve.java
java/org/apache/catalina/ha/session/DeltaSession.java
java/org/apache/catalina/ha/session/SessionIDMessage.java
java/org/apache/catalina/manager/Constants.java
java/org/apache/catalina/manager/HTMLManagerServlet.java
java/org/apache/catalina/manager/JspHelper.java
java/org/apache/catalina/realm/CombinedRealm.java
java/org/apache/catalina/realm/DataSourceRealm.java
java/org/apache/catalina/realm/JAASRealm.java
java/org/apache/catalina/realm/JDBCRealm.java
java/org/apache/catalina/realm/JNDIRealm.java
java/org/apache/catalina/realm/UserDatabaseRealm.java
java/org/apache/catalina/servlets/WebdavServlet.java
java/org/apache/catalina/session/JDBCStore.java
java/org/apache/catalina/session/PersistentManagerBase.java
java/org/apache/catalina/ssi/ResponseIncludeWrapper.java
java/org/apache/catalina/ssi/SSICommand.java
java/org/apache/catalina/ssi/SSIConditional.java
java/org/apache/catalina/ssi/SSIExec.java
java/org/apache/catalina/ssi/SSIFilter.java
java/org/apache/catalina/ssi/SSIFlastmod.java
java/org/apache/catalina/ssi/SSIInclude.java
java/org/apache/catalina/ssi/SSIPrintenv.java
java/org/apache/catalina/startup/CatalinaProperties.java
java/org/apache/catalina/startup/Embedded.java
java/org/apache/catalina/startup/HostConfig.java
java/org/apache/catalina/tribes/group/interceptors/DomainFilterInterceptor.java
java/org/apache/catalina/tribes/membership/McastService.java
java/org/apache/catalina/tribes/membership/McastServiceImpl.java
java/org/apache/catalina/tribes/transport/bio/BioReplicationTask.java
java/org/apache/catalina/tribes/transport/nio/NioReplicationTask.java
java/org/apache/catalina/tribes/util/ExecutorFactory.java

index 4541abb..aa2993f 100644 (file)
@@ -816,7 +816,7 @@ public final class ApplicationContextFacade
      * @param ex The current exception
      */
     private void handleException(Exception ex)
-           throws Throwable {
+        throws Throwable {
 
         Throwable realException;
         
index a38b6c8..1abfef8 100644 (file)
@@ -367,7 +367,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper {
     @Override
     public String getParameter(String name) {
 
-       parseParameters();
+        parseParameters();
 
         Object value = parameters.get(name);
         if (value == null)
@@ -389,7 +389,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper {
     @Override
     public Map<String, String[]> getParameterMap() {
 
-       parseParameters();
+        parseParameters();
         return (parameters);
 
     }
@@ -402,7 +402,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper {
     @Override
     public Enumeration<String> getParameterNames() {
 
-       parseParameters();
+        parseParameters();
         return (new Enumerator<String>(parameters.keySet()));
 
     }
@@ -417,7 +417,7 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper {
     @Override
     public String[] getParameterValues(String name) {
 
-       parseParameters();
+        parseParameters();
         Object value = parameters.get(name);
         if (value == null)
             return null;
@@ -751,9 +751,9 @@ class ApplicationHttpRequest extends HttpServletRequestWrapper {
      */
     void parseParameters() {
 
-       if (parsedParams) {
-           return;
-       }
+        if (parsedParams) {
+            return;
+        }
 
         parameters = new HashMap<String, String[]>();
         parameters = copyMap(getRequest().getParameterMap());
index 06c1c26..068f6c1 100644 (file)
@@ -124,8 +124,8 @@ public class DefaultInstanceManager implements InstanceManager {
     }
 
     public void newInstance(Object o) 
-               throws IllegalAccessException, InvocationTargetException, NamingException {
-       newInstance(o, o.getClass());
+            throws IllegalAccessException, InvocationTargetException, NamingException {
+        newInstance(o, o.getClass());
     }
 
     private Object newInstance(Object instance, Class<?> clazz) throws IllegalAccessException, InvocationTargetException, NamingException {
index b4a1bd5..2010027 100644 (file)
@@ -4742,10 +4742,10 @@ public class StandardContext extends ContainerBase
                 if (isUseNaming() && namingContextListener != null) {
                     context = namingContextListener.getEnvContext();
                 }
-                Map<String, Map<String, String>> injectionMap = 
-                       buildInjectionMap(getIgnoreAnnotations() ? new NamingResources(): getNamingResources());
-                instanceManager = new DefaultInstanceManager
-                       (context, injectionMap, this, this.getClass().getClassLoader());
+                Map<String, Map<String, String>> injectionMap = buildInjectionMap(
+                        getIgnoreAnnotations() ? new NamingResources(): getNamingResources());
+                instanceManager = new DefaultInstanceManager(
+                        context, injectionMap, this, this.getClass().getClassLoader());
                 getServletContext().setAttribute(InstanceManager.class.getName(), instanceManager);
             }
         }
@@ -5614,8 +5614,7 @@ public class StandardContext extends ContainerBase
      */
     public void removeNotificationListener(NotificationListener listener, 
             NotificationFilter filter, Object object) throws ListenerNotFoundException {
-       broadcaster.removeNotificationListener(listener,filter,object);
-       
+        broadcaster.removeNotificationListener(listener,filter,object);
     }
     
     private MBeanNotificationInfo[] notificationInfo;
@@ -5626,44 +5625,44 @@ public class StandardContext extends ContainerBase
      * @see javax.management.NotificationBroadcaster#getNotificationInfo()
      */
     public MBeanNotificationInfo[] getNotificationInfo() {
-       // FIXME: i18n
-       if(notificationInfo == null) {
-               notificationInfo = new MBeanNotificationInfo[]{
-                               new MBeanNotificationInfo(new String[] {
-                               "j2ee.object.created"},
-                                       Notification.class.getName(),
-                                       "web application is created"
-                               ), 
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.state.starting"},
-                                       Notification.class.getName(),
-                                       "change web application is starting"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.state.running"},
-                                       Notification.class.getName(),
-                                       "web application is running"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.state.stopping"},
-                                       Notification.class.getName(),
-                                       "web application start to stopped"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.object.stopped"},
-                                       Notification.class.getName(),
-                                       "web application is stopped"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.object.deleted"},
-                                       Notification.class.getName(),
-                                       "web application is deleted"
-                                       )
-               };
-               
-       }
-       
-       return notificationInfo;
+        // FIXME: i18n
+        if(notificationInfo == null) {
+            notificationInfo = new MBeanNotificationInfo[]{
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.object.created"},
+                    Notification.class.getName(),
+                    "web application is created"
+                    ), 
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.state.starting"},
+                    Notification.class.getName(),
+                    "change web application is starting"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.state.running"},
+                    Notification.class.getName(),
+                    "web application is running"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.state.stopping"},
+                    Notification.class.getName(),
+                    "web application start to stopped"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.object.stopped"},
+                    Notification.class.getName(),
+                    "web application is stopped"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.object.deleted"},
+                    Notification.class.getName(),
+                    "web application is deleted"
+                    )
+            };
+            
+        }
+        
+        return notificationInfo;
     }
     
     
@@ -5672,8 +5671,7 @@ public class StandardContext extends ContainerBase
      */
     public void addNotificationListener(NotificationListener listener, 
             NotificationFilter filter, Object object) throws IllegalArgumentException {
-       broadcaster.addNotificationListener(listener,filter,object);
-       
+        broadcaster.addNotificationListener(listener,filter,object);
     }
     
     
@@ -5683,8 +5681,7 @@ public class StandardContext extends ContainerBase
      */
     public void removeNotificationListener(NotificationListener listener) 
     throws ListenerNotFoundException {
-       broadcaster.removeNotificationListener(listener);
-       
+        broadcaster.removeNotificationListener(listener);
     }
     
     
@@ -5787,14 +5784,14 @@ public class StandardContext extends ContainerBase
      * @param newProcessTlds The new value
      */
     public void setProcessTlds(boolean newProcessTlds) {
-       processTlds = newProcessTlds;
+        processTlds = newProcessTlds;
     }
 
     /**
      * Returns the processTlds attribute value.
      */
     public boolean getProcessTlds() {
-       return processTlds;
+        return processTlds;
     }
 
     /**
index 1973492..24d7783 100644 (file)
@@ -758,7 +758,7 @@ public class StandardHost extends ContainerBase implements Host {
                         break;
                     }
                 }
-                if(!found) {           
+                if(!found) {
                     Valve valve = (Valve) Class.forName(errorReportValveClass).
                             newInstance();
                     getPipeline().addValve(valve);
index 2be3154..5e703cc 100644 (file)
@@ -175,12 +175,12 @@ public class StandardPipeline extends LifecycleBase
         // Start the Valves in our pipeline (including the basic), if any
         Valve current = first;
         if (current == null) {
-               current = basic;
+            current = basic;
         }
         while (current != null) {
             if (current instanceof Lifecycle)
                 ((Lifecycle) current).start();
-               current = current.getNext();
+            current = current.getNext();
         }
 
         setState(LifecycleState.STARTING);
@@ -202,12 +202,12 @@ public class StandardPipeline extends LifecycleBase
         // Stop the Valves in our pipeline (including the basic), if any
         Valve current = first;
         if (current == null) {
-               current = basic;
+            current = basic;
         }
         while (current != null) {
             if (current instanceof Lifecycle)
                 ((Lifecycle) current).stop();
-               current = current.getNext();
+            current = current.getNext();
         }
     }
 
@@ -303,11 +303,11 @@ public class StandardPipeline extends LifecycleBase
         // Update the pipeline
         Valve current = first;
         while (current != null) {
-               if (current.getNext() == oldBasic) {
-                       current.setNext(valve);
-                       break;
-               }
-               current = current.getNext();
+            if (current.getNext() == oldBasic) {
+                current.setNext(valve);
+                break;
+            }
+            current = current.getNext();
         }
         
         this.basic = valve;
@@ -353,18 +353,18 @@ public class StandardPipeline extends LifecycleBase
 
         // Add this Valve to the set associated with this Pipeline
         if (first == null) {
-               first = valve;
-               valve.setNext(basic);
+            first = valve;
+            valve.setNext(basic);
         } else {
             Valve current = first;
             while (current != null) {
-                               if (current.getNext() == basic) {
-                                       current.setNext(valve);
-                                       valve.setNext(basic);
-                                       break;
-                               }
-                               current = current.getNext();
-                       }
+                if (current.getNext() == basic) {
+                    current.setNext(valve);
+                    valve.setNext(basic);
+                    break;
+                }
+                current = current.getNext();
+            }
         }
         
         container.fireContainerEvent(Container.ADD_VALVE_EVENT, valve);
@@ -378,14 +378,14 @@ public class StandardPipeline extends LifecycleBase
      */
     public Valve[] getValves() {
 
-       ArrayList<Valve> valveList = new ArrayList<Valve>();
+        ArrayList<Valve> valveList = new ArrayList<Valve>();
         Valve current = first;
         if (current == null) {
-               current = basic;
+            current = basic;
         }
         while (current != null) {
-               valveList.add(current);
-               current = current.getNext();
+            valveList.add(current);
+            current = current.getNext();
         }
 
         return valveList.toArray(new Valve[0]);
@@ -394,16 +394,16 @@ public class StandardPipeline extends LifecycleBase
 
     public ObjectName[] getValveObjectNames() {
 
-       ArrayList<ObjectName> valveList = new ArrayList<ObjectName>();
+        ArrayList<ObjectName> valveList = new ArrayList<ObjectName>();
         Valve current = first;
         if (current == null) {
-               current = basic;
+            current = basic;
         }
         while (current != null) {
-               if (current instanceof ValveBase) {
-                       valveList.add(((ValveBase) current).getObjectName());
-               }
-               current = current.getNext();
+            if (current instanceof ValveBase) {
+                valveList.add(((ValveBase) current).getObjectName());
+            }
+            current = current.getNext();
         }
 
         return valveList.toArray(new ObjectName[0]);
index 690ade0..1a42ff6 100644 (file)
@@ -627,11 +627,11 @@ public class StandardWrapper extends ContainerBase
         HashSet<String> allow = new HashSet<String>();
         allow.add("TRACE");
         allow.add("OPTIONS");
-       
+
         Method[] methods = getAllDeclaredMethods(servletClazz);
         for (int i=0; methods != null && i<methods.length; i++) {
             Method m = methods[i];
-           
+
             if (m.getName().equals("doGet")) {
                 allow.add("GET");
                 allow.add("HEAD");
@@ -1636,15 +1636,15 @@ public class StandardWrapper extends ContainerBase
         if ((parentMethods != null) && (parentMethods.length > 0)) {
             Method[] allMethods =
                 new Method[parentMethods.length + thisMethods.length];
-           System.arraycopy(parentMethods, 0, allMethods, 0,
+            System.arraycopy(parentMethods, 0, allMethods, 0,
                              parentMethods.length);
-           System.arraycopy(thisMethods, 0, allMethods, parentMethods.length,
+            System.arraycopy(thisMethods, 0, allMethods, parentMethods.length,
                              thisMethods.length);
 
-           thisMethods = allMethods;
-       }
+            thisMethods = allMethods;
+        }
 
-       return thisMethods;
+        return thisMethods;
     }
 
 
@@ -1790,9 +1790,8 @@ public class StandardWrapper extends ContainerBase
      * @see javax.management.NotificationEmitter#removeNotificationListener(javax.management.NotificationListener, javax.management.NotificationFilter, java.lang.Object)
      */
     public void removeNotificationListener(NotificationListener listener, 
-               NotificationFilter filter, Object object) throws ListenerNotFoundException {
-       broadcaster.removeNotificationListener(listener,filter,object);
-       
+            NotificationFilter filter, Object object) throws ListenerNotFoundException {
+        broadcaster.removeNotificationListener(listener,filter,object);
     }
     
     protected MBeanNotificationInfo[] notificationInfo;
@@ -1803,44 +1802,43 @@ public class StandardWrapper extends ContainerBase
      * @see javax.management.NotificationBroadcaster#getNotificationInfo()
      */
     public MBeanNotificationInfo[] getNotificationInfo() {
-       
-       if(notificationInfo == null) {
-               notificationInfo = new MBeanNotificationInfo[]{
-                               new MBeanNotificationInfo(new String[] {
-                               "j2ee.object.created"},
-                                       Notification.class.getName(),
-                                       "servlet is created"
-                               ), 
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.state.starting"},
-                                       Notification.class.getName(),
-                                       "servlet is starting"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.state.running"},
-                                       Notification.class.getName(),
-                                       "servlet is running"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.state.stopped"},
-                                       Notification.class.getName(),
-                                       "servlet start to stopped"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.object.stopped"},
-                                       Notification.class.getName(),
-                                       "servlet is stopped"
-                                       ),
-                                       new MBeanNotificationInfo(new String[] {
-                                       "j2ee.object.deleted"},
-                                       Notification.class.getName(),
-                                       "servlet is deleted"
-                                       )
-               };
-               
-       }
-       
-       return notificationInfo;
+
+        if(notificationInfo == null) {
+            notificationInfo = new MBeanNotificationInfo[]{
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.object.created"},
+                    Notification.class.getName(),
+                    "servlet is created"
+                    ), 
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.state.starting"},
+                    Notification.class.getName(),
+                    "servlet is starting"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.state.running"},
+                    Notification.class.getName(),
+                    "servlet is running"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.state.stopped"},
+                    Notification.class.getName(),
+                    "servlet start to stopped"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.object.stopped"},
+                    Notification.class.getName(),
+                    "servlet is stopped"
+                    ),
+                    new MBeanNotificationInfo(new String[] {
+                    "j2ee.object.deleted"},
+                    Notification.class.getName(),
+                    "servlet is deleted"
+                    )
+            };
+        }
+
+        return notificationInfo;
     }
     
     
@@ -1849,7 +1847,7 @@ public class StandardWrapper extends ContainerBase
      */
     public void addNotificationListener(NotificationListener listener, 
             NotificationFilter filter, Object object) throws IllegalArgumentException {
-       broadcaster.addNotificationListener(listener,filter,object);
+        broadcaster.addNotificationListener(listener,filter,object);
     }
     
     
@@ -1859,7 +1857,7 @@ public class StandardWrapper extends ContainerBase
      */
     public void removeNotificationListener(NotificationListener listener) 
         throws ListenerNotFoundException {
-       broadcaster.removeNotificationListener(listener);
+        broadcaster.removeNotificationListener(listener);
     }
     
     
index 9c65583..067b858 100644 (file)
@@ -105,7 +105,7 @@ final class StandardWrapperValve
         
         // Check for the application being marked unavailable
         if (!context.getAvailable()) {
-               response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,
+            response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,
                            sm.getString("standardContext.isUnavailable"));
             unavailable = true;
         }
@@ -139,12 +139,12 @@ final class StandardWrapperValve
                             wrapper.getName()), e);
             long available = wrapper.getAvailable();
             if ((available > 0L) && (available < Long.MAX_VALUE)) {
-               response.setDateHeader("Retry-After", available);
-               response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,
+                response.setDateHeader("Retry-After", available);
+                response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE,
                            sm.getString("standardWrapper.isUnavailable",
                                         wrapper.getName()));
             } else if (available == Long.MAX_VALUE) {
-               response.sendError(HttpServletResponse.SC_NOT_FOUND,
+                response.sendError(HttpServletResponse.SC_NOT_FOUND,
                            sm.getString("standardWrapper.notFound",
                                         wrapper.getName()));
             }
@@ -173,7 +173,7 @@ final class StandardWrapperValve
         try {
             response.sendAcknowledgement();
         } catch (IOException e) {
-               request.removeAttribute(Globals.JSP_FILE_ATTR);
+            request.removeAttribute(Globals.JSP_FILE_ATTR);
             container.getLogger().warn(sm.getString("standardWrapper.acknowledgeException",
                              wrapper.getName()), e);
             throwable = e;
@@ -208,9 +208,9 @@ final class StandardWrapperValve
         try {
             String jspFile = wrapper.getJspFile();
             if (jspFile != null)
-               request.setAttribute(Globals.JSP_FILE_ATTR, jspFile);
+                request.setAttribute(Globals.JSP_FILE_ATTR, jspFile);
             else
-               request.removeAttribute(Globals.JSP_FILE_ATTR);
+                request.removeAttribute(Globals.JSP_FILE_ATTR);
             if ((servlet != null) && (filterChain != null)) {
                 // Swallow output if needed
                 if (context.getSwallowOutput()) {
@@ -248,18 +248,18 @@ final class StandardWrapperValve
             }
             request.removeAttribute(Globals.JSP_FILE_ATTR);
         } catch (ClientAbortException e) {
-               request.removeAttribute(Globals.JSP_FILE_ATTR);
+            request.removeAttribute(Globals.JSP_FILE_ATTR);
             throwable = e;
             exception(request, response, e);
         } catch (IOException e) {
-               request.removeAttribute(Globals.JSP_FILE_ATTR);
+            request.removeAttribute(Globals.JSP_FILE_ATTR);
             container.getLogger().error(sm.getString(
                     "standardWrapper.serviceException", wrapper.getName(),
                     context.getName()), e);
             throwable = e;
             exception(request, response, e);
         } catch (UnavailableException e) {
-               request.removeAttribute(Globals.JSP_FILE_ATTR);
+            request.removeAttribute(Globals.JSP_FILE_ATTR);
             container.getLogger().error(sm.getString(
                     "standardWrapper.serviceException", wrapper.getName(),
                     context.getName()), e);
@@ -273,14 +273,14 @@ final class StandardWrapperValve
                            sm.getString("standardWrapper.isUnavailable",
                                         wrapper.getName()));
             } else if (available == Long.MAX_VALUE) {
-               response.sendError(HttpServletResponse.SC_NOT_FOUND,
+                response.sendError(HttpServletResponse.SC_NOT_FOUND,
                             sm.getString("standardWrapper.notFound",
                                         wrapper.getName()));
             }
             // Do not save exception in 'throwable', because we
             // do not want to do exception(request, response, e) processing
         } catch (ServletException e) {
-               request.removeAttribute(Globals.JSP_FILE_ATTR);
+            request.removeAttribute(Globals.JSP_FILE_ATTR);
             Throwable rootCause = StandardWrapper.getRootCause(e);
             if (!(rootCause instanceof ClientAbortException)) {
                 container.getLogger().error(sm.getString(
@@ -535,7 +535,7 @@ final class StandardWrapperValve
      */
     private void exception(Request request, Response response,
                            Throwable exception) {
-       request.setAttribute(Globals.EXCEPTION_ATTR, exception);
+        request.setAttribute(Globals.EXCEPTION_ATTR, exception);
         response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
 
     }
index 105bc44..d05141e 100644 (file)
@@ -371,10 +371,10 @@ public class DeltaSession extends StandardSession implements Externalizable,Clus
      */
     @Override
     public void endAccess() {
-       super.endAccess() ;
-       if(manager instanceof DeltaManager) {
-            ((DeltaManager)manager).registerSessionAtReplicationValve(this);           
-       }
+        super.endAccess() ;
+        if(manager instanceof DeltaManager) {
+            ((DeltaManager)manager).registerSessionAtReplicationValve(this);
+        }
     }
     
     // ------------------------------------------------- Session Public Methods
index 24da67e..3853ca4 100644 (file)
@@ -27,28 +27,28 @@ import org.apache.catalina.ha.ClusterMessageBase;
  */
 public class SessionIDMessage extends ClusterMessageBase {
 
-       private int messageNumber;
+    private int messageNumber;
 
-       private String orignalSessionID;
+    private String orignalSessionID;
 
-       private String backupSessionID;
+    private String backupSessionID;
 
-       private String host ;
-       private String contextPath;
+    private String host ;
+    private String contextPath;
 
-       @Override
+    @Override
     public String getUniqueId() {
-               StringBuilder result = new StringBuilder(getOrignalSessionID());
-               result.append("#-#");
-               result.append(getHost());
+        StringBuilder result = new StringBuilder(getOrignalSessionID());
+        result.append("#-#");
+        result.append(getHost());
                 result.append("#-#");
                 result.append(getContextPath());
-               result.append("#-#");
-               result.append(getMessageNumber());
-               result.append("#-#");
-               result.append(System.currentTimeMillis());
-               return result.toString();
-       }
+        result.append("#-#");
+        result.append(getMessageNumber());
+        result.append("#-#");
+        result.append(System.currentTimeMillis());
+        return result.toString();
+    }
 
     /**
      * @return Returns the host.
@@ -64,68 +64,68 @@ public class SessionIDMessage extends ClusterMessageBase {
         this.host = host;
     }
     
-       /**
-        * @return Returns the contextPath.
-        */
-       public String getContextPath() {
-               return contextPath;
-       }
-       /**
-        * @param contextPath The contextPath to set.
-        */
-       public void setContextPath(String contextPath) {
-               this.contextPath = contextPath;
-       }
-       /**
-        * @return Returns the messageNumber.
-        */
-       public int getMessageNumber() {
-               return messageNumber;
-       }
-
-       /**
-        * @param messageNumber
-        *            The messageNumber to set.
-        */
-       public void setMessageNumber(int messageNumber) {
-               this.messageNumber = messageNumber;
-       }
-
-       
-       /**
-        * @return Returns the backupSessionID.
-        */
-       public String getBackupSessionID() {
-               return backupSessionID;
-       }
-
-       /**
-        * @param backupSessionID
-        *            The backupSessionID to set.
-        */
-       public void setBackupSessionID(String backupSessionID) {
-               this.backupSessionID = backupSessionID;
-       }
-
-       /**
-        * @return Returns the orignalSessionID.
-        */
-       public String getOrignalSessionID() {
-               return orignalSessionID;
-       }
-
-       /**
-        * @param orignalSessionID
-        *            The orignalSessionID to set.
-        */
-       public void setOrignalSessionID(String orignalSessionID) {
-               this.orignalSessionID = orignalSessionID;
-       }
-
-       @Override
+    /**
+     * @return Returns the contextPath.
+     */
+    public String getContextPath() {
+        return contextPath;
+    }
+    /**
+     * @param contextPath The contextPath to set.
+     */
+    public void setContextPath(String contextPath) {
+        this.contextPath = contextPath;
+    }
+    /**
+     * @return Returns the messageNumber.
+     */
+    public int getMessageNumber() {
+        return messageNumber;
+    }
+
+    /**
+     * @param messageNumber
+     *            The messageNumber to set.
+     */
+    public void setMessageNumber(int messageNumber) {
+        this.messageNumber = messageNumber;
+    }
+
+    
+    /**
+     * @return Returns the backupSessionID.
+     */
+    public String getBackupSessionID() {
+        return backupSessionID;
+    }
+
+    /**
+     * @param backupSessionID
+     *            The backupSessionID to set.
+     */
+    public void setBackupSessionID(String backupSessionID) {
+        this.backupSessionID = backupSessionID;
+    }
+
+    /**
+     * @return Returns the orignalSessionID.
+     */
+    public String getOrignalSessionID() {
+        return orignalSessionID;
+    }
+
+    /**
+     * @param orignalSessionID
+     *            The orignalSessionID to set.
+     */
+    public void setOrignalSessionID(String orignalSessionID) {
+        this.orignalSessionID = orignalSessionID;
+    }
+
+    @Override
     public String toString() {
-           return "SESSIONID-UPDATE#" + getHost() + "." + getContextPath() + "#" + getOrignalSessionID() + ":" + getBackupSessionID();
-       }
+        return "SESSIONID-UPDATE#" + getHost() + "." + getContextPath() + "#" + getOrignalSessionID() + ":" + getBackupSessionID();
+    }
 
 }
 
index dd3be6d..d77def0 100644 (file)
@@ -197,7 +197,7 @@ public class Constants {
 
     public static final String XML_DECLARATION =
         "<?xml version=\"1.0\" encoding=\""+CHARSET+"\"?>";
-               
+
     public static final String XML_STYLE =
         "<?xml-stylesheet type=\"text/xsl\" href=\"xform.xsl\" ?>";
 
index e72651d..dc5ce4e 100644 (file)
@@ -813,9 +813,9 @@ public final class HTMLManagerServlet extends ManagerServlet {
             log("sessions: Session action '" + action + "' for web application at '" + path + "'");
         }
         if ("sessionDetail".equals(action)) {
-               String sessionId = req.getParameter("sessionId");
-               displaySessionDetailPage(req, resp, path, sessionId);
-               return;
+            String sessionId = req.getParameter("sessionId");
+            displaySessionDetailPage(req, resp, path, sessionId);
+            return;
         } else if ("invalidateSessions".equals(action)) {
             String[] sessionIds = req.getParameterValues("sessionIds");
             int i = invalidateSessions(path, sessionIds);
@@ -887,11 +887,11 @@ public final class HTMLManagerServlet extends ManagerServlet {
                     //orderBy = "DESC";
                 }
                 try {
-                                       Collections.sort(activeSessions, comparator);
-                               } catch (IllegalStateException ise) {
-                                       // at least 1 of the sessions is invalidated
-                                       req.setAttribute(APPLICATION_ERROR, "Can't sort session list: one session is invalidated");
-                               }
+                    Collections.sort(activeSessions, comparator);
+                } catch (IllegalStateException ise) {
+                    // at least 1 of the sessions is invalidated
+                    req.setAttribute(APPLICATION_ERROR, "Can't sort session list: one session is invalidated");
+                }
             } else {
                 log("WARNING: unknown sort order: " + sortBy);
             }
@@ -944,22 +944,22 @@ public final class HTMLManagerServlet extends ManagerServlet {
             HttpSession session = getSessionForPathAndId(path, sessionId).getSession();
             if (null == session) {
                 // Shouldn't happen, but let's play nice...
-               if (debug >= 1) {
-                       log("WARNING: can't invalidate null session " + sessionId);
-               }
+                if (debug >= 1) {
+                    log("WARNING: can't invalidate null session " + sessionId);
+                }
                 continue;
             }
             try {
-                               session.invalidate();
-                               ++nbAffectedSessions;
-                   if (debug >= 1) {
-                       log("Invalidating session id " + sessionId);
-                   }
-                       } catch (IllegalStateException ise) {
-                               if (debug >= 1) {
-                                       log("Can't invalidate already invalidated session id " + sessionId);
-                               }
-                       }
+                session.invalidate();
+                ++nbAffectedSessions;
+                if (debug >= 1) {
+                    log("Invalidating session id " + sessionId);
+                }
+            } catch (IllegalStateException ise) {
+                if (debug >= 1) {
+                    log("Can't invalidate already invalidated session id " + sessionId);
+                }
+            }
         }
         return nbAffectedSessions;
     }
@@ -975,18 +975,18 @@ public final class HTMLManagerServlet extends ManagerServlet {
         HttpSession session = getSessionForPathAndId(path, sessionId).getSession();
         if (null == session) {
             // Shouldn't happen, but let's play nice...
-               if (debug >= 1) {
-                       log("WARNING: can't remove attribute '" + attributeName + "' for null session " + sessionId);
-               }
+            if (debug >= 1) {
+                log("WARNING: can't remove attribute '" + attributeName + "' for null session " + sessionId);
+            }
             return false;
         }
         boolean wasPresent = (null != session.getAttribute(attributeName));
         try {
             session.removeAttribute(attributeName);
         } catch (IllegalStateException ise) {
-               if (debug >= 1) {
-                       log("Can't remote attribute '" + attributeName + "' for invalidated session id " + sessionId);
-               }
+            if (debug >= 1) {
+                log("Can't remote attribute '" + attributeName + "' for invalidated session id " + sessionId);
+            }
         }
         return wasPresent;
     }
@@ -1002,21 +1002,21 @@ public final class HTMLManagerServlet extends ManagerServlet {
         HttpSession session = getSessionForPathAndId(path, sessionId).getSession();
         if (null == session) {
             // Shouldn't happen, but let's play nice...
-               if (debug >= 1) {
-                       log("WARNING: can't set timout for null session " + sessionId);
-               }
+            if (debug >= 1) {
+                log("WARNING: can't set timout for null session " + sessionId);
+            }
             return 0;
         }
         try {
-                       int oldMaxInactiveInterval = session.getMaxInactiveInterval();
-                       session.setMaxInactiveInterval(maxInactiveInterval);
-                       return oldMaxInactiveInterval;
+            int oldMaxInactiveInterval = session.getMaxInactiveInterval();
+            session.setMaxInactiveInterval(maxInactiveInterval);
+            return oldMaxInactiveInterval;
         } catch (IllegalStateException ise) {
-               if (debug >= 1) {
-                       log("Can't set MaxInactiveInterval '" + maxInactiveInterval + "' for invalidated session id " + sessionId);
-               }
-               return 0;
-               }
+            if (debug >= 1) {
+                log("Can't set MaxInactiveInterval '" + maxInactiveInterval + "' for invalidated session id " + sessionId);
+            }
+            return 0;
+        }
     }
 
     protected Comparator<Session> getComparator(String sortBy) {
index bd02bb2..1c8aed0 100644 (file)
@@ -73,22 +73,22 @@ public class JspHelper {
 
     public static String getDisplayCreationTimeForSession(Session in_session) {
         try {
-                       DateFormat formatter = new SimpleDateFormat(DATE_TIME_FORMAT);
-                       return formatter.format(new Date(in_session.getCreationTime()));
+            DateFormat formatter = new SimpleDateFormat(DATE_TIME_FORMAT);
+            return formatter.format(new Date(in_session.getCreationTime()));
         } catch (IllegalStateException ise) {
-               //ignore: invalidated session
-               return "";
-               }
+            //ignore: invalidated session
+            return "";
+        }
     }
 
     public static String getDisplayLastAccessedTimeForSession(Session in_session) {
         try {
-                       DateFormat formatter = new SimpleDateFormat(DATE_TIME_FORMAT);
-                       return formatter.format(new Date(in_session.getLastAccessedTime()));
+            DateFormat formatter = new SimpleDateFormat(DATE_TIME_FORMAT);
+            return formatter.format(new Date(in_session.getLastAccessedTime()));
         } catch (IllegalStateException ise) {
-               //ignore: invalidated session
-               return "";
-               }
+            //ignore: invalidated session
+            return "";
+        }
     }
 
     public static String getDisplayUsedTimeForSession(Session in_session) {
@@ -166,9 +166,9 @@ public class JspHelper {
      * See also OutSupport.writeEscapedXml().
      */
     public static String escapeXml(String buffer) {
-       if (buffer == null) {
-                       return "";
-               }
+        if (buffer == null) {
+            return "";
+        }
         int start = 0;
         int length = buffer.length();
         char[] arrayBuffer = buffer.toCharArray();
@@ -205,6 +205,6 @@ public class JspHelper {
     }
 
     public static String formatNumber(long number) {
-       return NumberFormat.getNumberInstance().format(number);
+        return NumberFormat.getNumberInstance().format(number);
     }
 }
index fc31e26..59cc21d 100644 (file)
@@ -47,36 +47,36 @@ public class CombinedRealm extends RealmBase {
     /**
      * The list of Realms contained by this Realm.
      */
-       protected List<Realm> realms = new LinkedList<Realm>();
-
-
-       /**
-        * Add a realm to the list of realms that will be used to authenticate
-        * users.
-        */
-       public void addRealm(Realm theRealm) {
-           realms.add(theRealm);
-           
-           if (log.isDebugEnabled()) {
-               sm.getString("combinedRealm.addRealm", theRealm.getInfo(), 
-                       Integer.toString(realms.size()));
-           }
-       }
-
-
-       /**
-        * Return the set of Realms that this Realm is wrapping
-        */
-       public ObjectName[] getRealms() {
-           ObjectName[] result = new ObjectName[realms.size()];
-           for (Realm realm : realms) {
-               if (realm instanceof RealmBase) {
-                   result[realms.indexOf(realm)] =
-                       ((RealmBase) realm).getObjectName();
-               }
-           }
-           return result;
-       }
+    protected List<Realm> realms = new LinkedList<Realm>();
+
+
+    /**
+     * Add a realm to the list of realms that will be used to authenticate
+     * users.
+     */
+    public void addRealm(Realm theRealm) {
+        realms.add(theRealm);
+        
+        if (log.isDebugEnabled()) {
+            sm.getString("combinedRealm.addRealm", theRealm.getInfo(), 
+                    Integer.toString(realms.size()));
+        }
+    }
+
+
+    /**
+     * Return the set of Realms that this Realm is wrapping
+     */
+    public ObjectName[] getRealms() {
+        ObjectName[] result = new ObjectName[realms.size()];
+        for (Realm realm : realms) {
+            if (realm instanceof RealmBase) {
+                result[realms.indexOf(realm)] =
+                    ((RealmBase) realm).getObjectName();
+            }
+        }
+        return result;
+    }
 
 
     /**
@@ -187,19 +187,19 @@ public class CombinedRealm extends RealmBase {
     @Override
     protected void startInternal() throws LifecycleException {
         // Start 'sub-realms' then this one
-       Iterator<Realm> iter = realms.iterator();
-       
+        Iterator<Realm> iter = realms.iterator();
+        
         while (iter.hasNext()) {
-               Realm realm = iter.next();
+            Realm realm = iter.next();
             if (realm instanceof Lifecycle) {
-               try {
-                       ((Lifecycle) realm).start();
-               } catch (LifecycleException e) {
-                       // If realm doesn't start can't authenticate against it
-                       iter.remove();
-                       log.error(sm.getString("combinedRealm.realmStartFail",
-                                       realm.getInfo()), e);
-               }
+                try {
+                    ((Lifecycle) realm).start();
+                } catch (LifecycleException e) {
+                    // If realm doesn't start can't authenticate against it
+                    iter.remove();
+                    log.error(sm.getString("combinedRealm.realmStartFail",
+                            realm.getInfo()), e);
+                }
             }
         }
         super.startInternal();
index 7b491a7..b8f85a0 100644 (file)
@@ -249,7 +249,7 @@ public class DataSourceRealm
      * <code>&lt;description&gt;/&lt;version&gt;</code>.
      */
     @Override
-       public String getInfo() {
+    public String getInfo() {
 
         return info;
 
@@ -274,14 +274,14 @@ public class DataSourceRealm
      */
     @Override
     public Principal authenticate(String username, String credentials) {
-       
-       // No user or no credentials
+        
+        // No user or no credentials
         // Can't possibly authenticate, don't bother the database then
-       if (username == null || credentials == null) {
-               return null;
-       }
+        if (username == null || credentials == null) {
+            return null;
+        }
         
-       Connection dbConnection = null;
+        Connection dbConnection = null;
 
         // Ensure that we have an open database connection
         dbConnection = open();
@@ -293,9 +293,9 @@ public class DataSourceRealm
         // Acquire a Principal object for this user
         Principal principal = authenticate(dbConnection, username, credentials);
             
-       close(dbConnection);
+        close(dbConnection);
 
-       return principal;
+        return principal;
     }
 
 
@@ -395,7 +395,7 @@ public class DataSourceRealm
                     ((StandardServer)getServer()).getGlobalNamingContext();
             }
             DataSource dataSource = (DataSource)context.lookup(dataSourceName);
-           return dataSource.getConnection();
+        return dataSource.getConnection();
         } catch (Exception e) {
             // Log the problem for posterity
             containerLog.error(sm.getString("dataSourceRealm.exception"), e);
@@ -428,7 +428,7 @@ public class DataSourceRealm
         }
 
         try {
-               return getPassword(dbConnection, username);             
+            return getPassword(dbConnection, username);            
         } finally {
             close(dbConnection);
         }
@@ -440,7 +440,7 @@ public class DataSourceRealm
      * @param username Username for which password should be retrieved
      */
     protected String getPassword(Connection dbConnection, 
-                                                                String username) {
+                                 String username) {
 
         ResultSet rs = null;
         PreparedStatement stmt = null;
@@ -460,19 +460,19 @@ public class DataSourceRealm
                     sm.getString("dataSourceRealm.getPassword.exception",
                                  username));
         } finally {
-               try {
-                   if (rs != null) {
-                       rs.close();
-                   }
-                   if (stmt != null) {
-                       stmt.close();
-                   }
-               } catch (SQLException e) {
+            try {
+                if (rs != null) {
+                    rs.close();
+                }
+                if (stmt != null) {
+                    stmt.close();
+                }
+            } catch (SQLException e) {
                     containerLog.error(
                         sm.getString("dataSourceRealm.getPassword.exception",
-                                    username));
-                       
-               }
+                             username));
+                
+            }
         }
         
         return null;
@@ -484,16 +484,16 @@ public class DataSourceRealm
      */
     @Override
     protected Principal getPrincipal(String username) {
-       Connection dbConnection = open();
+        Connection dbConnection = open();
         if (dbConnection == null) {
             return new GenericPrincipal(username, null, null);
         }
         try {
-               return (new GenericPrincipal(username,
-                                       getPassword(dbConnection, username),
-                                       getRoles(dbConnection, username)));
+            return (new GenericPrincipal(username,
+                    getPassword(dbConnection, username),
+                    getRoles(dbConnection, username)));
         } finally {
-               close(dbConnection);
+            close(dbConnection);
         }
 
     }
@@ -515,7 +515,7 @@ public class DataSourceRealm
         try {
             return getRoles(dbConnection, username);
         } finally {
-               close(dbConnection);
+            close(dbConnection);
         }
     }
     
@@ -526,43 +526,43 @@ public class DataSourceRealm
      */
     protected ArrayList<String> getRoles(Connection dbConnection,
                                      String username) {
-       
+        
         ResultSet rs = null;
         PreparedStatement stmt = null;
         ArrayList<String> list = null;
-       
+        
         try {
-               stmt = roles(dbConnection, username);
-               rs = stmt.executeQuery();
-               list = new ArrayList<String>();
-               
-               while (rs.next()) {
-                       String role = rs.getString(1);
-                       if (role != null) {
-                               list.add(role.trim());
-                       }
-               }
-               return list;
-       } catch(SQLException e) {
+            stmt = roles(dbConnection, username);
+            rs = stmt.executeQuery();
+            list = new ArrayList<String>();
+            
+            while (rs.next()) {
+                String role = rs.getString(1);
+                if (role != null) {
+                    list.add(role.trim());
+                }
+            }
+            return list;
+        } catch(SQLException e) {
             containerLog.error(
                 sm.getString("dataSourceRealm.getRoles.exception", username));
         }
-       finally {
-               try {
-                   if (rs != null) {
-                       rs.close();
-                   }
-                   if (stmt != null) {
-                       stmt.close();
-                   }
-               } catch (SQLException e) {
+        finally {
+            try {
+                if (rs != null) {
+                    rs.close();
+                }
+                if (stmt != null) {
+                    stmt.close();
+                }
+            } catch (SQLException e) {
                     containerLog.error(
                         sm.getString("dataSourceRealm.getRoles.exception",
                                      username));
-               }
+            }
         }
-       
-       return null;
+        
+        return null;
     }
 
     /**
index 0ee4cbe..60f985e 100644 (file)
@@ -308,7 +308,7 @@ public class JAASRealm
      * <code>&lt;description&gt;/&lt;version&gt;</code>.
      */
     @Override
-       public String getInfo() {
+    public String getInfo() {
 
         return info;
 
index d978b76..5921569 100644 (file)
@@ -311,7 +311,7 @@ public class JDBCRealm
      * <code>&lt;description&gt;/&lt;version&gt;</code>.
      */
     @Override
-       public String getInfo() {
+    public String getInfo() {
 
         return info;
 
index 4d50915..6ce7834 100644 (file)
@@ -907,7 +907,7 @@ public class JNDIRealm extends RealmBase {
      * <code>&lt;description&gt;/&lt;version&gt;</code>.
      */
     @Override
-       public String getInfo() {
+    public String getInfo() {
 
         return info;
 
@@ -2012,7 +2012,7 @@ public class JNDIRealm extends RealmBase {
         if (derefAliases != null)
             env.put(JNDIRealm.DEREF_ALIASES, derefAliases);
         if (connectionTimeout != null)
-               env.put("com.sun.jndi.ldap.connect.timeout", connectionTimeout);
+            env.put("com.sun.jndi.ldap.connect.timeout", connectionTimeout);
 
         return env;
 
index b1f49bd..9de514c 100644 (file)
@@ -168,7 +168,7 @@ public class UserDatabaseRealm
         }
         return false;
     }
-               
+
     // ------------------------------------------------------ Protected Methods
 
 
index 7542037..403be89 100644 (file)
@@ -2041,9 +2041,9 @@ public class WebdavServlet
 
         CacheEntry cacheEntry = resources.lookupCache(path);
         if (!cacheEntry.exists) {
-               // File is in directory listing but doesn't appear to exist
-               // Broken symlink or odd permission settings?
-               return;
+            // File is in directory listing but doesn't appear to exist
+            // Broken symlink or odd permission settings?
+            return;
         }
 
         generatedXML.writeElement(null, "D:response", XMLWriter.OPENING);
index 2b6d822..0d009d5 100644 (file)
@@ -460,7 +460,7 @@ public class JDBCStore extends StoreBase {
                                 + sessionTable + " WHERE " + sessionAppCol
                                 + " = ?";
                         preparedKeysSql = _conn.prepareStatement(keysSql);
-                                       }
+                    }
 
                     preparedKeysSql.setString(1, getName());
                     rst = preparedKeysSql.executeQuery();
@@ -523,7 +523,7 @@ public class JDBCStore extends StoreBase {
                                 + ") FROM " + sessionTable + " WHERE "
                                 + sessionAppCol + " = ?";
                         preparedSizeSql = _conn.prepareStatement(sizeSql);
-                                       }
+                    }
 
                     preparedSizeSql.setString(1, getName());
                     rst = preparedSizeSql.executeQuery();
@@ -780,7 +780,7 @@ public class JDBCStore extends StoreBase {
                            + sessionLastAccessedCol
                            + ") VALUES (?, ?, ?, ?, ?, ?)";
                        preparedSaveSql = _conn.prepareStatement(saveSql);
-                                       }
+                    }
 
                     preparedSaveSql.setString(1, session.getIdInternal());
                     preparedSaveSql.setString(2, getName());
@@ -926,7 +926,7 @@ public class JDBCStore extends StoreBase {
             ExceptionUtils.handleThrowable(f);
         }
          
-               try {
+        try {
             preparedRemoveSql.close();
         } catch (Throwable f) {
             ExceptionUtils.handleThrowable(f);
index 259ace6..5e73ea6 100644 (file)
@@ -201,7 +201,7 @@ public abstract class PersistentManagerBase extends ManagerBase
      * Sessions currently being swapped in and the associated locks
      */
     private final Map<String,Object> sessionSwapInLocks =
-       new HashMap<String,Object>();
+        new HashMap<String,Object>();
 
 
     // ------------------------------------------------------------- Properties
@@ -211,10 +211,10 @@ public abstract class PersistentManagerBase extends ManagerBase
 
 
     /**
-        * Indicates how many seconds old a session can get, after its last use in a
-        * request, before it should be backed up to the store. -1 means sessions
-        * are not backed up.
-        */
+     * Indicates how many seconds old a session can get, after its last use in a
+     * request, before it should be backed up to the store. -1 means sessions
+     * are not backed up.
+     */
     public int getMaxIdleBackup() {
 
         return maxIdleBackup;
@@ -314,13 +314,13 @@ public abstract class PersistentManagerBase extends ManagerBase
 
 
     /**
-        * Set the Container with which this Manager has been associated. If it is a
-        * Context (the usual case), listen for changes to the session timeout
-        * property.
-        
-        * @param container
-        *            The associated Container
-        */
+     * Set the Container with which this Manager has been associated. If it is a
+     * Context (the usual case), listen for changes to the session timeout
+     * property.
+     * 
+     * @param container
+     *            The associated Container
+     */
     @Override
     public void setContainer(Container container) {
 
@@ -517,9 +517,9 @@ public abstract class PersistentManagerBase extends ManagerBase
     /**
      * Implements the Manager interface, direct call to processExpires and processPersistenceChecks
      */
-       @Override
+    @Override
     public void processExpires() {
-               
+        
         long timeNow = System.currentTimeMillis();
         Session sessions[] = findSessions();
         int expireHere = 0 ;
@@ -540,8 +540,8 @@ public abstract class PersistentManagerBase extends ManagerBase
         if(log.isDebugEnabled())
              log.debug("End expire sessions " + getName() + " processingTime " + (timeEnd - timeNow) + " expired sessions: " + expireHere);
         processingTime += (timeEnd - timeNow);
-               
-       }
+         
+    }
 
 
     /**
index 072f9f3..d2fffb2 100644 (file)
@@ -78,8 +78,8 @@ public class ResponseIncludeWrapper extends HttpServletResponseWrapper {
      * @param captureServletOutputStream The ServletOutputStream to use
      */
     public ResponseIncludeWrapper(ServletContext context, 
-               HttpServletRequest request, HttpServletResponse response,
-           ServletOutputStream captureServletOutputStream) {
+            HttpServletRequest request, HttpServletResponse response,
+            ServletOutputStream captureServletOutputStream) {
         super(response);
         this.context = context;
         this.request = request;
@@ -184,14 +184,11 @@ public class ResponseIncludeWrapper extends HttpServletResponseWrapper {
         if (contentType == null) {
             String url = request.getRequestURI();
             String mime = context.getMimeType(url);
-            if (mime != null)
-            {
+            if (mime != null) {
                 setContentType(mime);
-            }
-            else
-            {
-               // return a safe value
-               setContentType("application/x-octet-stream");
+            } else {
+                // return a safe value
+                setContentType("application/x-octet-stream");
             }
         }
         return contentType;
index 8c9ca65..02b7c1b 100644 (file)
@@ -45,7 +45,7 @@ public interface SSICommand {
      * @throws SSIStopProcessingException
      *             if SSI processing should be aborted
      */
-       public long process(SSIMediator ssiMediator, String commandName,
+    public long process(SSIMediator ssiMediator, String commandName,
             String[] paramNames, String[] paramValues, PrintWriter writer)
             throws SSIStopProcessingException;
 }
\ No newline at end of file
index e24b6b6..6fa9334 100644 (file)
@@ -33,8 +33,8 @@ public class SSIConditional implements SSICommand {
     public long process(SSIMediator ssiMediator, String commandName,
             String[] paramNames, String[] paramValues, PrintWriter writer)
             throws SSIStopProcessingException {
-       // Assume anything using conditionals was modified by it
-       long lastModified = System.currentTimeMillis();
+        // Assume anything using conditionals was modified by it
+        long lastModified = System.currentTimeMillis();
         // Retrieve the current state information
         SSIConditionalState state = ssiMediator.getConditionalState();
         if ("if".equalsIgnoreCase(commandName)) {
index 5894786..2070dfe 100644 (file)
@@ -49,8 +49,8 @@ public class SSIExec implements SSICommand {
         String substitutedValue = ssiMediator.substituteVariables(paramValue);
         if (paramName.equalsIgnoreCase("cgi")) {
             lastModified = ssiInclude.process(ssiMediator, "include",
-                                       new String[]{"virtual"}, new String[]{substitutedValue},
-                                                               writer);
+                    new String[]{"virtual"}, new String[]{substitutedValue},
+                    writer);
         } else if (paramName.equalsIgnoreCase("cmd")) {
             boolean foundProgram = false;
             try {
index 567cd1f..7d58f90 100644 (file)
@@ -47,7 +47,7 @@ import org.apache.catalina.Globals;
  * @see org.apache.catalina.ssi.SSIServlet
  */
 public class SSIFilter implements Filter {
-       protected FilterConfig config = null;
+    protected FilterConfig config = null;
     /** Debug level for this servlet. */
     protected int debug = 0;
     /** Expiration time in seconds for the doc. */
@@ -55,12 +55,12 @@ public class SSIFilter implements Filter {
     /** virtual path can be webapp-relative */
     protected boolean isVirtualWebappRelative = false;
     /** regex pattern to match when evaluating content types */
-       protected Pattern contentTypeRegEx = null;
-       /** default pattern for ssi filter content type matching */
-       protected Pattern shtmlRegEx =
+    protected Pattern contentTypeRegEx = null;
+    /** default pattern for ssi filter content type matching */
+    protected Pattern shtmlRegEx =
         Pattern.compile("text/x-server-parsed-html(;.*)?");
-       /** Allow exec (normally blocked for security) */
-       protected boolean allowExec = false;
+    /** Allow exec (normally blocked for security) */
+    protected boolean allowExec = false;
 
 
     //----------------- Public methods.
@@ -71,8 +71,8 @@ public class SSIFilter implements Filter {
      *                if an error occurs
      */
     public void init(FilterConfig config) throws ServletException {
-       this.config = config;
-       
+        this.config = config;
+        
         if (config.getInitParameter("debug") != null) {
             debug = Integer.parseInt(config.getInitParameter("debug"));
         }
@@ -159,10 +159,10 @@ public class SSIFilter implements Filter {
             Matcher shtmlMatcher =
                 shtmlRegEx.matcher(responseIncludeWrapper.getContentType());
             if (shtmlMatcher.matches()) {
-               // Convert shtml mime type to ordinary html mime type but preserve
+                // Convert shtml mime type to ordinary html mime type but preserve
                 // encoding, if any.
-               String enc = shtmlMatcher.group(1);
-               res.setContentType("text/html" + ((enc != null) ? enc : ""));
+                String enc = shtmlMatcher.group(1);
+                res.setContentType("text/html" + ((enc != null) ? enc : ""));
             }
         }
 
index 7986ba5..40d1cb6 100644 (file)
@@ -37,7 +37,7 @@ public final class SSIFlastmod implements SSICommand {
      */
     public long process(SSIMediator ssiMediator, String commandName,
             String[] paramNames, String[] paramValues, PrintWriter writer) {
-       long lastModified = 0;
+        long lastModified = 0;
         String configErrMsg = ssiMediator.getConfigErrMsg();
         for (int i = 0; i < paramNames.length; i++) {
             String paramName = paramNames[i];
index 441aa90..e3c86e6 100644 (file)
@@ -46,7 +46,7 @@ public final class SSIInclude implements SSICommand {
                         || paramName.equalsIgnoreCase("virtual")) {
                     boolean virtual = paramName.equalsIgnoreCase("virtual");
                     lastModified = ssiMediator.getFileLastModified(
-                                substitutedValue, virtual);
+                            substitutedValue, virtual);
                     String text = ssiMediator.getFileText(substitutedValue,
                             virtual);
                     writer.write(text);
index 07aaaa1..4455f6b 100644 (file)
@@ -33,7 +33,7 @@ public class SSIPrintenv implements SSICommand {
      */
     public long process(SSIMediator ssiMediator, String commandName,
             String[] paramNames, String[] paramValues, PrintWriter writer) {
-       long lastModified = 0;
+        long lastModified = 0;
         //any arguments should produce an error
         if (paramNames.length > 0) {
             String errorMessage = ssiMediator.getConfigErrMsg();
index ca74bcc..0028275 100644 (file)
@@ -60,7 +60,7 @@ public class CatalinaProperties {
      * Return specified property value.
      */
     public static String getProperty(String name) {
-       
+    
         return properties.getProperty(name);
 
     }
index 695a494..5966cec 100644 (file)
@@ -371,8 +371,8 @@ public class Embedded  extends StandardService {
      */
     public Connector createConnector(InetAddress address, int port,
                                      boolean secure) {
-       return createConnector(address != null? address.toString() : null,
-                              port, secure);
+        return createConnector(address != null? address.toString() : null,
+                port, secure);
     }
 
     public Connector createConnector(String address, int port,
@@ -388,33 +388,33 @@ public class Embedded  extends StandardService {
 
     public Connector createConnector(InetAddress address, int port,
                                      String protocol) {
-       return createConnector(address != null? address.toString() : null,
-                              port, protocol);
+        return createConnector(address != null? address.toString() : null,
+                port, protocol);
     }
 
     public Connector createConnector(String address, int port,
-                                    String protocol) {
+            String protocol) {
 
         Connector connector = null;
 
-       if (address != null) {
-           /*
-            * InetAddress.toString() returns a string of the form
-            * "<hostname>/<literal_IP>". Get the latter part, so that the
-            * address can be parsed (back) into an InetAddress using
-            * InetAddress.getByName().
-            */
-           int index = address.indexOf('/');
-           if (index != -1) {
-               address = address.substring(index + 1);
-           }
-       }
-
-       if (log.isDebugEnabled()) {
+        if (address != null) {
+            /*
+             * InetAddress.toString() returns a string of the form
+             * "<hostname>/<literal_IP>". Get the latter part, so that the
+             * address can be parsed (back) into an InetAddress using
+             * InetAddress.getByName().
+             */
+            int index = address.indexOf('/');
+            if (index != -1) {
+                address = address.substring(index + 1);
+            }
+        }
+
+        if (log.isDebugEnabled()) {
             log.debug("Creating connector for address='" +
-                     ((address == null) ? "ALL" : address) +
-                     "' port='" + port + "' protocol='" + protocol + "'");
-       }
+                      ((address == null) ? "ALL" : address) +
+                      "' port='" + port + "' protocol='" + protocol + "'");
+        }
 
         try {
 
index f6b6582..03c8846 100644 (file)
@@ -390,12 +390,12 @@ public class HostConfig
      * on which the application was deployed
      */
     public long getDeploymentTime(String name) {
-       DeployedApplication app = deployed.get(name);
-       if (app == null) {
-               return 0L;
-       }
-       
-       return app.timestamp;
+        DeployedApplication app = deployed.get(name);
+        if (app == null) {
+            return 0L;
+        }
+        
+        return app.timestamp;
     }
     
     
@@ -1546,40 +1546,40 @@ public class HostConfig
      * the monitored resources.
      */
     protected class DeployedApplication {
-       public DeployedApplication(String name) {
-               this.name = name;
-       }
-       
-       /**
-        * Application context path. The assertion is that 
-        * (host.getChild(name) != null).
-        */
-       public String name;
-       
-       /**
-        * Any modification of the specified (static) resources will cause a 
-        * redeployment of the application. If any of the specified resources is
-        * removed, the application will be undeployed. Typically, this will
-        * contain resources like the context.xml file, a compressed WAR path.
+        public DeployedApplication(String name) {
+            this.name = name;
+        }
+        
+        /**
+         * Application context path. The assertion is that 
+         * (host.getChild(name) != null).
+         */
+        public String name;
+        
+        /**
+         * Any modification of the specified (static) resources will cause a 
+         * redeployment of the application. If any of the specified resources is
+         * removed, the application will be undeployed. Typically, this will
+         * contain resources like the context.xml file, a compressed WAR path.
          * The value is the last modification time.
-        */
-       public LinkedHashMap<String, Long> redeployResources =
-           new LinkedHashMap<String, Long>();
-
-       /**
-        * Any modification of the specified (static) resources will cause a 
-        * reload of the application. This will typically contain resources
-        * such as the web.xml of a webapp, but can be configured to contain
-        * additional descriptors.
+         */
+        public LinkedHashMap<String, Long> redeployResources =
+            new LinkedHashMap<String, Long>();
+
+        /**
+         * Any modification of the specified (static) resources will cause a 
+         * reload of the application. This will typically contain resources
+         * such as the web.xml of a webapp, but can be configured to contain
+         * additional descriptors.
          * The value is the last modification time.
-        */
-       public HashMap<String, Long> reloadResources =
-           new HashMap<String, Long>();
-
-       /**
-        * Instant where the application was last put in service.
-        */
-       public long timestamp = System.currentTimeMillis();
+         */
+        public HashMap<String, Long> reloadResources =
+            new HashMap<String, Long>();
+
+        /**
+         * Instant where the application was last put in service.
+         */
+     public long timestamp = System.currentTimeMillis();
     }
 
 }
index f241888..245ef92 100644 (file)
@@ -109,7 +109,7 @@ public class DomainFilterInterceptor extends ChannelInterceptorBase {
         if ( domain == null ) return;
         if (domain.startsWith("{"))
             setDomain(org.apache.catalina.tribes.util.Arrays.fromString(domain));
-           else
+        else
             setDomain(org.apache.catalina.tribes.util.Arrays.convert(domain));
     }
 
index 5b1ba70..cbb7506 100644 (file)
@@ -243,11 +243,11 @@ public class McastService implements MembershipService,MembershipListener,Messag
     }
     
     public int getRecoveryCounter(){
-       String p = properties.getProperty("recoveryCounter");
-       if(p != null){
-               return new Integer(p).intValue();
-       }
-       return -1;
+        String p = properties.getProperty("recoveryCounter");
+        if(p != null){
+            return new Integer(p).intValue();
+        }
+        return -1;
     }
 
     public void setRecoveryEnabled(boolean recoveryEnabled) {
@@ -255,11 +255,11 @@ public class McastService implements MembershipService,MembershipListener,Messag
     }
     
     public boolean getRecoveryEnabled() {
-       String p = properties.getProperty("recoveryEnabled");
-       if(p != null){
-               return new Boolean(p).booleanValue();
-       }
-       return false;
+        String p = properties.getProperty("recoveryEnabled");
+        if(p != null){
+            return new Boolean(p).booleanValue();
+        }
+        return false;
     }
 
     public void setRecoverySleepTime(long recoverySleepTime) {
@@ -267,11 +267,11 @@ public class McastService implements MembershipService,MembershipListener,Messag
     }
     
     public long getRecoverySleepTime(){
-       String p = properties.getProperty("recoverySleepTime");
-       if(p != null){
-               return new Long(p).longValue();
-       }
-       return -1;
+        String p = properties.getProperty("recoverySleepTime");
+        if(p != null){
+            return new Long(p).longValue();
+        }
+        return -1;
     }
 
     public void setLocalLoopbackDisabled(boolean localLoopbackDisabled) {
@@ -279,11 +279,11 @@ public class McastService implements MembershipService,MembershipListener,Messag
     }
     
     public boolean getLocalLoopbackDisabled(boolean localLoopbackDisabled) {
-       String p = properties.getProperty("localLoopbackDisabled");
-       if(p != null){
-               return new Boolean(p).booleanValue();
-       }
-       return false;
+        String p = properties.getProperty("localLoopbackDisabled");
+        if(p != null){
+            return new Boolean(p).booleanValue();
+        }
+        return false;
     }
 
     /**
index e29d8e0..fc417ac 100644 (file)
@@ -222,7 +222,7 @@ public class McastServiceImpl
         }
         socket.setLoopbackMode(localLoopbackDisabled); //hint if we want disable loop back(local machine) messages
         if (mcastBindAddress != null) {
-                       if(log.isInfoEnabled())
+            if(log.isInfoEnabled())
                 log.info("Setting multihome multicast interface to:" +mcastBindAddress);
             socket.setInterface(mcastBindAddress);
         } //end if
@@ -233,7 +233,7 @@ public class McastServiceImpl
         socket.setSoTimeout(mcastSoTimeout);
 
         if ( mcastTTL >= 0 ) {
-                       if(log.isInfoEnabled())
+            if(log.isInfoEnabled())
                 log.info("Setting cluster mcast TTL to " + mcastTTL);
             socket.setTimeToLive(mcastTTL);
         }
index d001a87..06d3e87 100644 (file)
@@ -78,7 +78,7 @@ public class BioReplicationTask extends AbstractRxTask {
     public synchronized void serviceSocket(Socket socket, ObjectReader reader) {
         this.socket = socket;
         this.reader = reader;
-        this.notify();         // awaken the thread
+        this.notify();      // awaken the thread
     }
     
     protected void execute(ObjectReader reader) throws Exception{
index 3d56426..067622f 100644 (file)
@@ -83,7 +83,7 @@ public class NioReplicationTask extends AbstractRxTask {
             buffer.clear();
         }
         if (key == null) {
-            return;    // just in case
+            return; // just in case
         }
         if ( log.isTraceEnabled() )
             log.trace("Servicing key:"+key);
@@ -155,18 +155,18 @@ public class NioReplicationTask extends AbstractRxTask {
         reader.access();
         ReadableByteChannel channel = (ReadableByteChannel) key.channel();
         int count=-1;
-        buffer.clear();                        // make buffer empty
+        buffer.clear();         // make buffer empty
         SocketAddress saddr = null;
 
         if (channel instanceof SocketChannel) {
             // loop while data available, channel is non-blocking
             while ((count = channel.read (buffer)) > 0) {
-                buffer.flip();         // make buffer readable
+                buffer.flip();      // make buffer readable
                 if ( buffer.hasArray() )
                     reader.append(buffer.array(),0,count,false);
                 else
                     reader.append(buffer,count,false);
-                buffer.clear();                // make buffer empty
+                buffer.clear();     // make buffer empty
                 //do we have at least one package?
                 if ( reader.hasPackage() ) break;
             }
index fd7b4e7..de8d2e2 100644 (file)
@@ -27,21 +27,21 @@ import java.util.concurrent.TimeUnit;
 
 public class ExecutorFactory {
 
-       public static ExecutorService newThreadPool(int minThreads, int maxThreads, long maxIdleTime, TimeUnit unit) {
-               TaskQueue taskqueue = new TaskQueue();
-               ThreadPoolExecutor service = new ThreadPoolExecutor(minThreads, maxThreads, maxIdleTime, unit,taskqueue);
-               taskqueue.setParent(service);
-               return service;         
-       }
+    public static ExecutorService newThreadPool(int minThreads, int maxThreads, long maxIdleTime, TimeUnit unit) {
+        TaskQueue taskqueue = new TaskQueue();
+        ThreadPoolExecutor service = new ThreadPoolExecutor(minThreads, maxThreads, maxIdleTime, unit,taskqueue);
+        taskqueue.setParent(service);
+        return service;
+    }
 
-       public static ExecutorService newThreadPool(int minThreads, int maxThreads, long maxIdleTime, TimeUnit unit, ThreadFactory threadFactory) {
-               TaskQueue taskqueue = new TaskQueue();
-               ThreadPoolExecutor service = new ThreadPoolExecutor(minThreads, maxThreads, maxIdleTime, unit,taskqueue, threadFactory);
-               taskqueue.setParent(service);
-               return service;
-       }
-       
-        // ---------------------------------------------- TaskQueue Inner Class
+    public static ExecutorService newThreadPool(int minThreads, int maxThreads, long maxIdleTime, TimeUnit unit, ThreadFactory threadFactory) {
+        TaskQueue taskqueue = new TaskQueue();
+        ThreadPoolExecutor service = new ThreadPoolExecutor(minThreads, maxThreads, maxIdleTime, unit,taskqueue, threadFactory);
+        taskqueue.setParent(service);
+        return service;
+    }
+    
+     // ---------------------------------------------- TaskQueue Inner Class
     private static class TaskQueue extends LinkedBlockingQueue<Runnable> {
         ThreadPoolExecutor parent = null;