cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject svn commit: r1051782 - in /cxf/branches/2.2.x-fixes: ./ common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
Date Wed, 22 Dec 2010 07:53:36 GMT
Author: ningjiang
Date: Wed Dec 22 07:53:35 2010
New Revision: 1051782

URL: http://svn.apache.org/viewvc?rev=1051782&view=rev
Log:
Merged revisions 1051780 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.3.x-fixes

................
  r1051780 | ningjiang | 2010-12-22 15:33:50 +0800 (Wed, 22 Dec 2010) | 9 lines
  
  Merged revisions 1049426 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/trunk
  
  ........
    r1049426 | dkulp | 2010-12-15 12:55:14 +0800 (Wed, 15 Dec 2010) | 1 line
    
    [CXF-1924] make sure the tmp dir is writable as well
  ........
................

Modified:
    cxf/branches/2.2.x-fixes/   (props changed)
    cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Dec 22 07:53:35 2010
@@ -1,2 +1,2 @@
-/cxf/branches/2.3.x-fixes:1041185,1044309
-/cxf/trunk:1041183,1044238-1044305
+/cxf/branches/2.3.x-fixes:1041185,1044309,1051780
+/cxf/trunk:1041183,1044238-1044305,1049426

Propchange: cxf/branches/2.2.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java?rev=1051782&r1=1051781&r2=1051782&view=diff
==============================================================================
--- cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
(original)
+++ cxf/branches/2.2.x-fixes/common/common/src/main/java/org/apache/cxf/helpers/FileUtils.java
Wed Dec 22 07:53:35 2010
@@ -64,12 +64,18 @@ public final class FileUtils {
             int x = (int)(Math.random() * 1000000);
             s = System.getProperty("java.io.tmpdir");
             File checkExists = new File(s);
-            if (!checkExists.exists()) {
+            if (!checkExists.exists() || !checkExists.isDirectory()) {
                 throw new RuntimeException("The directory " 
                                        + checkExists.getAbsolutePath() 
                                        + " does not exist, please set java.io.tempdir"
                                        + " to an existing directory");
             }
+            if (!checkExists.canWrite()) {
+                throw new RuntimeException("The directory " 
+                                       + checkExists.getAbsolutePath() 
+                                       + " is now writable, please set java.io.tempdir"
+                                       + " to an writable directory");
+            }
             File f = new File(s, "cxf-tmp-" + x);
             while (!f.mkdir()) {
                 x = (int)(Math.random() * 1000000);



Mime
View raw message