markt       2004/05/05 15:04:42

  Modified:    jasper2/src/share/org/apache/jasper/compiler Tag:
                        tomcat_4_branch Compiler.java
  Log:
  Fix bug 20953. NPE when running in standalone mode and no useful error message.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.18.2.16 +11 -7     
jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java
  
  Index: Compiler.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/compiler/Compiler.java,v
  retrieving revision 1.18.2.15
  retrieving revision 1.18.2.16
  diff -u -r1.18.2.15 -r1.18.2.16
  --- Compiler.java     5 May 2004 21:51:03 -0000       1.18.2.15
  +++ Compiler.java     5 May 2004 22:04:42 -0000       1.18.2.16
  @@ -197,6 +197,10 @@
       public void generateJava()
           throws FileNotFoundException, JasperException, Exception
       {
  +        if (errDispatcher == null) {
  +            this.errDispatcher = new ErrorDispatcher();
  +        }
  +
           // Setup page info area
           pageInfo = new PageInfo(new BeanRepository(ctxt.getClassLoader()));
   
  @@ -247,6 +251,10 @@
       public void generateClass()
           throws FileNotFoundException, JasperException, Exception {
   
  +        if (errDispatcher == null) {
  +            this.errDispatcher = new ErrorDispatcher();
  +        }
  +
           String javaEncoding = ctxt.getOptions().getJavaEncoding();
           String javaFileName = ctxt.getServletJavaFileName();
           String classpath = ctxt.getClassPath(); 
  @@ -355,10 +363,6 @@
       public void compile()
           throws FileNotFoundException, JasperException, Exception
       {
  -        if (errDispatcher == null) {
  -            this.errDispatcher = new ErrorDispatcher();
  -        }
  -
           try {
               generateJava();
               generateClass();
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to