[jboss-cvs] JBossAS SVN: r65640 - in branches: Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Sep 26 18:51:42 EDT 2007


Author: mmoyses
Date: 2007-09-26 18:51:42 -0400 (Wed, 26 Sep 2007)
New Revision: 65640

Modified:
   branches/Branch_4_0/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java
   branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java
Log:
Fixing formatting

Modified: branches/Branch_4_0/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java
===================================================================
--- branches/Branch_4_0/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java	2007-09-26 22:45:57 UTC (rev 65639)
+++ branches/Branch_4_0/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java	2007-09-26 22:51:42 UTC (rev 65640)
@@ -41,41 +41,45 @@
  * @author mmoyses at redhat.com
  * @version $Revison:$
  */
-public class PrincipalSessionAttributeFilter implements Filter {
+public class PrincipalSessionAttributeFilter implements Filter
+{
 
-	private static Logger log = Logger
-			.getLogger(PrincipalSessionAttributeFilter.class);
+   private static Logger log = Logger.getLogger(PrincipalSessionAttributeFilter.class);
 
-	private boolean trace = log.isTraceEnabled();
+   private boolean trace = log.isTraceEnabled();
 
-	private static final String JBOSS_PRINCIPAL = "org.jboss.web.tomcat.security.principal";
+   private static final String JBOSS_PRINCIPAL = "org.jboss.web.tomcat.security.principal";
 
-	/**
-	 * @see Filter#init(javax.servlet.FilterConfig)
-	 */
-	public void init(FilterConfig filterConfig) throws ServletException {
-	}
+   /**
+    * @see Filter#init(javax.servlet.FilterConfig)
+    */
+   public void init(FilterConfig filterConfig) throws ServletException
+   {
+   }
 
-	/**
-	 * @see Filter#destroy()
-	 */
-	public void destroy() {
-	}
+   /**
+    * @see Filter#destroy()
+    */
+   public void destroy()
+   {
+   }
 
-	/**
-	 * @see Filter#doFilter(javax.servlet.ServletRequest,
-	 *      javax.servlet.ServletResponse, javax.servlet.FilterChain)
-	 */
-	public void doFilter(ServletRequest request, ServletResponse response,
-			FilterChain chain) throws IOException, ServletException {
-		HttpSession session = ((HttpServletRequest) request).getSession();
-		Principal principal = (Principal) session.getAttribute(JBOSS_PRINCIPAL);
-		if (principal == null) {
-			principal = ((HttpServletRequest) request).getUserPrincipal();
-			session.setAttribute(JBOSS_PRINCIPAL, principal);
-			if (trace)
-				log.trace("Placing principal in session");
-		}
-	}
+   /**
+    * @see Filter#doFilter(javax.servlet.ServletRequest,
+    *      javax.servlet.ServletResponse, javax.servlet.FilterChain)
+    */
+   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
+         ServletException
+   {
+      HttpSession session = ((HttpServletRequest) request).getSession();
+      Principal principal = (Principal) session.getAttribute(JBOSS_PRINCIPAL);
+      if (principal == null)
+      {
+         principal = ((HttpServletRequest) request).getUserPrincipal();
+         session.setAttribute(JBOSS_PRINCIPAL, principal);
+         if (trace)
+            log.trace("Placing principal in session");
+      }
+   }
 
 }

Modified: branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java
===================================================================
--- branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java	2007-09-26 22:45:57 UTC (rev 65639)
+++ branches/Branch_4_2/tomcat/src/main/org/jboss/web/tomcat/security/PrincipalSessionAttributeFilter.java	2007-09-26 22:51:42 UTC (rev 65640)
@@ -41,41 +41,45 @@
  * @author mmoyses at redhat.com
  * @version $Revison:$
  */
-public class PrincipalSessionAttributeFilter implements Filter {
+public class PrincipalSessionAttributeFilter implements Filter
+{
 
-	private static Logger log = Logger
-			.getLogger(PrincipalSessionAttributeFilter.class);
+   private static Logger log = Logger.getLogger(PrincipalSessionAttributeFilter.class);
 
-	private boolean trace = log.isTraceEnabled();
+   private boolean trace = log.isTraceEnabled();
 
-	private static final String JBOSS_PRINCIPAL = "org.jboss.web.tomcat.security.principal";
+   private static final String JBOSS_PRINCIPAL = "org.jboss.web.tomcat.security.principal";
 
-	/**
-	 * @see Filter#init(javax.servlet.FilterConfig)
-	 */
-	public void init(FilterConfig filterConfig) throws ServletException {
-	}
+   /**
+    * @see Filter#init(javax.servlet.FilterConfig)
+    */
+   public void init(FilterConfig filterConfig) throws ServletException
+   {
+   }
 
-	/**
-	 * @see Filter#destroy()
-	 */
-	public void destroy() {
-	}
+   /**
+    * @see Filter#destroy()
+    */
+   public void destroy()
+   {
+   }
 
-	/**
-	 * @see Filter#doFilter(javax.servlet.ServletRequest,
-	 *      javax.servlet.ServletResponse, javax.servlet.FilterChain)
-	 */
-	public void doFilter(ServletRequest request, ServletResponse response,
-			FilterChain chain) throws IOException, ServletException {
-		HttpSession session = ((HttpServletRequest) request).getSession();
-		Principal principal = (Principal) session.getAttribute(JBOSS_PRINCIPAL);
-		if (principal == null) {
-			principal = ((HttpServletRequest) request).getUserPrincipal();
-			session.setAttribute(JBOSS_PRINCIPAL, principal);
-			if (trace)
-				log.trace("Placing principal in session");
-		}
-	}
+   /**
+    * @see Filter#doFilter(javax.servlet.ServletRequest,
+    *      javax.servlet.ServletResponse, javax.servlet.FilterChain)
+    */
+   public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
+         ServletException
+   {
+      HttpSession session = ((HttpServletRequest) request).getSession();
+      Principal principal = (Principal) session.getAttribute(JBOSS_PRINCIPAL);
+      if (principal == null)
+      {
+         principal = ((HttpServletRequest) request).getUserPrincipal();
+         session.setAttribute(JBOSS_PRINCIPAL, principal);
+         if (trace)
+            log.trace("Placing principal in session");
+      }
+   }
 
 }




More information about the jboss-cvs-commits mailing list