jdk/src/share/classes/java/io/File.java
changeset 25223 4d33af5975a5
parent 24865 09b1d992ca72
equal deleted inserted replaced
25222:5d63cd3696d6 25223:4d33af5975a5
  1995      */
  1995      */
  1996     public static File createTempFile(String prefix, String suffix,
  1996     public static File createTempFile(String prefix, String suffix,
  1997                                       File directory)
  1997                                       File directory)
  1998         throws IOException
  1998         throws IOException
  1999     {
  1999     {
  2000         if (prefix.length() < 3)
  2000         if (prefix.length() < 3) {
  2001             throw new IllegalArgumentException("Prefix string too short");
  2001             throw new IllegalArgumentException("Prefix string \"" + prefix +
       
  2002                 "\" too short: length must be at least 3");
       
  2003         }
  2002         if (suffix == null)
  2004         if (suffix == null)
  2003             suffix = ".tmp";
  2005             suffix = ".tmp";
  2004 
  2006 
  2005         File tmpdir = (directory != null) ? directory
  2007         File tmpdir = (directory != null) ? directory
  2006                                           : TempDirectory.location();
  2008                                           : TempDirectory.location();