You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xmlbeans-cvs@xml.apache.org by pc...@apache.org on 2004/06/04 02:22:58 UTC
cvs commit: xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool SchemaCodeGenerator.java
pcal 2004/06/03 17:22:58
Modified: v2/src/xmlcomp/org/apache/xmlbeans/impl/tool
SchemaCodeGenerator.java
Log:
workaround for apprent bugs in File.createTempDir in recent JDK betas
Revision Changes Path
1.9 +8 -0 xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCodeGenerator.java
Index: SchemaCodeGenerator.java
===================================================================
RCS file: /home/cvs/xml-xmlbeans/v2/src/xmlcomp/org/apache/xmlbeans/impl/tool/SchemaCodeGenerator.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- SchemaCodeGenerator.java 3 Jun 2004 21:28:36 -0000 1.8
+++ SchemaCodeGenerator.java 4 Jun 2004 00:22:58 -0000 1.9
@@ -341,6 +341,14 @@
protected static File createTempDir() throws IOException
{
+
+// Some beta builds of JDK1.5 are having troubles creating temp directories
+// if the java.io.tmpdir doesn't exist. This seems to help.
+try {
+ File tmpDirFile = new File(System.getProperty("java.io.tmpdir"));
+ tmpDirFile.mkdirs();
+} catch(Exception e) { e.printStackTrace(); }
+
File tmpFile = File.createTempFile("xbean", null);
String path = tmpFile.getAbsolutePath();
if (!path.endsWith(".tmp"))
---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-cvs-help@xml.apache.org