axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Q (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-4358) Faulty code while creating _axis2 temp folder!
Date Thu, 28 May 2009 18:03:45 GMT
Faulty code while creating _axis2 temp folder!
----------------------------------------------

                 Key: AXIS2-4358
                 URL: https://issues.apache.org/jira/browse/AXIS2-4358
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: deployment
    Affects Versions: 1.4.1
            Reporter: Q
            Priority: Blocker


The following code is faulty when there is no write access - this happens expecially on Unix
based environments! 
The first f.mkdirs() is throwing an exception and the recovery else is never called! 


  164               File f = new File((File) config.getServletContext().getAttribute("javax.servlet.context.tempdir"),
"_axis2");
  165               if (f.exists() || f.mkdirs()) {
  166                   param.setValue(f);
  167               } else {
  168                   f = new File(System.getProperty("java.io.tmpdir"), "_axis2");
  169                   if (f.exists() || f.mkdirs()) {
  170                       param.setValue(f);
  171                   } else {
  172                       throw new DeploymentException("Unable to create a temporary working
directory");
  173                   }
  174               }



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message