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

Gavin King gavin.king at jboss.com
Wed Nov 15 13:46:47 EST 2006


  User: gavin   
  Date: 06/11/15 13:46:47

  Modified:    src/main/org/jboss/seam/core  Jbpm.java
  Log:
  better than NPE
  
  Revision  Changes    Path
  1.36      +8 -0      jboss-seam/src/main/org/jboss/seam/core/Jbpm.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Jbpm.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Jbpm.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -b -r1.35 -r1.36
  --- Jbpm.java	4 Nov 2006 02:17:50 -0000	1.35
  +++ Jbpm.java	15 Nov 2006 18:46:47 -0000	1.36
  @@ -240,6 +240,14 @@
      
      public static Jbpm instance()
      {
  +      if ( !Contexts.isApplicationContextActive() )
  +      {
  +         throw new IllegalStateException("No application context active");
  +      }
  +      if ( !Init.instance().isJbpmInstalled() )
  +      {
  +         throw new IllegalStateException("jBPM support is not installed (use components.xml to install it)");
  +      }
         return (Jbpm) Contexts.getApplicationContext().get(Jbpm.class);
      }
   
  
  
  



More information about the jboss-cvs-commits mailing list