[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...

Shane Bryzak Shane_Bryzak at symantec.com
Sun Oct 15 20:25:46 EDT 2006


  User: sbryzak2
  Date: 06/10/15 20:25:46

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  Fixed NPE for session-scoped components without @Synchronized annotation.  Gavin, is it right to set a default timeout?
  
  Revision  Changes    Path
  1.193     +15 -14    jboss-seam/src/main/org/jboss/seam/Component.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Component.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
  retrieving revision 1.192
  retrieving revision 1.193
  diff -u -b -r1.192 -r1.193
  --- Component.java	15 Oct 2006 22:43:01 -0000	1.192
  +++ Component.java	16 Oct 2006 00:25:46 -0000	1.193
  @@ -111,7 +111,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.192 $
  + * @version $Revision: 1.193 $
    */
   @Scope(ScopeType.APPLICATION)
   public class Component
  @@ -220,7 +220,8 @@
            {
               throw new IllegalArgumentException("@Synchronized not meaningful for stateless components: " + name);
            }
  -         timeout = beanClass.getAnnotation(Synchronized.class).timeout();
  +         timeout = beanClass.isAnnotationPresent(Synchronized.class) ?
  +             beanClass.getAnnotation(Synchronized.class).timeout() : Synchronized.DEFAULT_TIMEOUT;
         }
   
         jndiName = getJndiName(applicationContext);
  
  
  



More information about the jboss-cvs-commits mailing list