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

Gavin King gavin.king at jboss.com
Wed Mar 7 13:16:24 EST 2007


  User: gavin   
  Date: 07/03/07 13:16:24

  Modified:    src/main/org/jboss/seam/init  Initialization.java
  Log:
  fix tests
  
  Revision  Changes    Path
  1.159     +21 -17    jboss-seam/src/main/org/jboss/seam/init/Initialization.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Initialization.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/init/Initialization.java,v
  retrieving revision 1.158
  retrieving revision 1.159
  diff -u -b -r1.158 -r1.159
  --- Initialization.java	7 Mar 2007 17:25:47 -0000	1.158
  +++ Initialization.java	7 Mar 2007 18:16:23 -0000	1.159
  @@ -61,7 +61,7 @@
   /**
    * @author Gavin King
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
  - * @version $Revision: 1.158 $
  + * @version $Revision: 1.159 $
    */
   public class Initialization
   {
  @@ -536,8 +536,11 @@
         ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
         try
         {
  -         String webxmlPath = contextClassLoader.getResource("META-INF/debug.xhtml").toExternalForm();
  -         String hotDeployDirectory = webxmlPath.substring( 9, webxmlPath.length()-46 ) + "dev";
  +         URL resource = contextClassLoader.getResource("META-INF/debug.xhtml");
  +         if (resource!=null)
  +         {
  +            String path = resource.toExternalForm();
  +            String hotDeployDirectory = path.substring( 9, path.length()-46 ) + "dev";
            File directory = new File(hotDeployDirectory);
            if ( directory.exists() )
            {
  @@ -555,6 +558,7 @@
               hotDeployPaths = new File[] {directory};
            }
         }
  +      }
         catch (MalformedURLException mue)
         {
            throw new RuntimeException(mue);
  
  
  



More information about the jboss-cvs-commits mailing list