Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4383864

Font.createFont leaves ttf files in /var/tmp

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.3.0
    • client-libs
    • None
    • 2d
    • sparc
    • solaris_8

      Font.createFont creates temporary files in /var/tmp and does not clean them up. This eventually leads to filling the device. The following source shows this:

      import java.awt.*;
      import java.io.*;

      public class FontTest
      {
          public static void main(String [] args)
          {
              File file = new File("/usr/openwin/lib/X11/fonts/TrueType/Arial.ttf");
              try
              {
                  FileInputStream in = new FileInputStream(file);
                  Font arial = Font.createFont(Font.TRUETYPE_FONT, in);
              }catch(Exception e) { e.printStackTrace(); }
          }
      }

      % javac FontTest
      % ls /var/tmp/*.ttf
      ls: No match.
      % java FontTest
      % !ls
      ls /var/tmp/*.ttf
      /var/tmp/font9432.ttf
      % java FontTest
      % !ls
      ls /var/tmp/*.ttf
      /var/tmp/font37475.ttf /var/tmp/font9432.ttf

            Unassigned Unassigned
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: