luehe 2004/05/10 09:34:59 Modified: jasper2/src/share/org/apache/jasper/compiler Compiler.java Log: Fixed Bugzilla 28603 ("JspC Ant task does not detect errors on a second compile") This fix complements the earlier fix by closing the ServletWriter *before* attempting to File.delete() Patch provided by: [EMAIL PROTECTED] Revision Changes Path 1.83 +10 -2 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.82 retrieving revision 1.83 diff -u -r1.82 -r1.83 --- Compiler.java 29 Apr 2004 18:33:50 -0000 1.82 +++ Compiler.java 10 May 2004 16:34:59 -0000 1.83 @@ -258,14 +258,22 @@ } } catch (Exception e) { + if (writer != null) { + try { + writer.close(); + writer = null; + } catch (Exception e1) { + // do nothing + } + } // Remove the generated .java file - new File(javaFileName).delete(); + new File(javaFileName).delete(); throw e; } finally { if (writer != null) { try { writer.close(); - } catch (Exception e) { + } catch (Exception e2) { // do nothing } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]