luehe       2003/02/10 10:18:05

  Modified:    jasper2/src/share/org/apache/jasper/compiler Tag:
                        tomcat_4_branch Compiler.java
  Log:
  Backport to TC 4.1.x: Fixed a NPE caused by nulling errorDispatcher: it is needed 
for Parser
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.18.2.11 +7 -6      
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.10
  retrieving revision 1.18.2.11
  diff -u -r1.18.2.10 -r1.18.2.11
  --- Compiler.java     26 Jan 2003 18:55:51 -0000      1.18.2.10
  +++ Compiler.java     10 Feb 2003 18:18:05 -0000      1.18.2.11
  @@ -146,9 +146,6 @@
       // Lazy eval - if we don't need to compile we probably don't need the project
       private Project getProject() {
   
  -        if (errDispatcher == null) {
  -            this.errDispatcher = new ErrorDispatcher();
  -        }
           if( project!=null ) return project;
   
           // Initializing project
  @@ -361,6 +358,10 @@
       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