Reviewers: Lex,

Description:
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 by: sp...@google.com

Please review this at http://gwt-code-reviews.appspot.com/699804/show

Affected files:
  M dev/core/src/com/google/gwt/dev/util/Util.java


Index: dev/core/src/com/google/gwt/dev/util/Util.java
===================================================================
--- dev/core/src/com/google/gwt/dev/util/Util.java      (revision 8444)
+++ dev/core/src/com/google/gwt/dev/util/Util.java      (working copy)
@@ -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