Revision: 8447
Author: [email protected]
Date: Fri Jul 30 11:17:44 2010
Log: Ensure that we give createTempFile at least 3 characters for the prefix

See: http://code.google.com/p/google-weab-toolkit/issues/detail?id=5178

Review at http://gwt-code-reviews.appspot.com/699804

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=8447

Modified:
 /trunk/dev/core/src/com/google/gwt/dev/util/Util.java

=======================================
--- /trunk/dev/core/src/com/google/gwt/dev/util/Util.java Tue Mar 30 09:15:42 2010 +++ /trunk/dev/core/src/com/google/gwt/dev/util/Util.java Fri Jul 30 11:17:44 2010
@@ -643,6 +643,10 @@
     File tmpSrc;
     Throwable caught = null;
     try {
+      // The tempFile prefix must be at least 3 characters
+      while (typeName.length() < 3) {
+        typeName = "_" + typeName;
+      }
       tmpSrc = File.createTempFile(typeName, ".java");
       writeStringAsFile(tmpSrc, source);
       String dumpPath = tmpSrc.getAbsolutePath();

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to