tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r...@apache.org
Subject cvs commit: jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper JspC.java
Date Mon, 10 Feb 2003 10:31:50 GMT
remm        2003/02/10 02:31:50

  Modified:    jasper2/src/share/org/apache/jasper JspC.java
  Log:
  - Fix NPE.
  - Submitted (partially) by Yoshiyuki Karezaki <kare at highway.ne.jp>
  
  Revision  Changes    Path
  1.29      +12 -12    jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java
  
  Index: JspC.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat-jasper/jasper2/src/share/org/apache/jasper/JspC.java,v
  retrieving revision 1.28
  retrieving revision 1.29
  diff -u -r1.28 -r1.29
  --- JspC.java	22 Jan 2003 21:13:51 -0000	1.28
  +++ JspC.java	10 Feb 2003 10:31:49 -0000	1.29
  @@ -379,15 +379,6 @@
        * Resolve relative path, and create output directories.
        */
       void setupContext(JspCompilationContext clctxt) {
  -        // set up a scratch/output dir if none is provided
  -        if (scratchDir == null) {
  -            String temp = System.getProperty("java.io.tempdir");
  -            if (temp == null) {
  -                temp = "";
  -            }
  -            scratchDir = new File(new File(temp).getAbsolutePath());
  -        }
  -
           String outputDir = scratchDir.getAbsolutePath();
   
           if (dirset) {
  @@ -526,6 +517,15 @@
           throws JasperException
       {
           try {
  +            // set up a scratch/output dir if none is provided
  +            if (scratchDir == null) {
  +                String temp = System.getProperty("java.io.tmpdir");
  +                if (temp == null) {
  +                    temp = "";
  +                }
  +                scratchDir = new File(new File(temp).getAbsolutePath());
  +            }
  +
               String jspUri=file.replace('\\','/');
               String baseDir = scratchDir.getCanonicalPath();
               this.setOutputDir( baseDir + jspUri.substring( 0, jspUri.lastIndexOf( '/' )
) );
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message