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

java.awt.GraphicsEnvironment.getAvailableFontFamilyNames(null) throws NPE

XMLWordPrintable

    • 2d
    • beta
    • generic
    • generic

      java.awt.GraphicsEnvironment.getAvailableFontFamilyNames(Locale l) throws NullPointerException when null is passed as the argument. But as per doc it is supposed to return an array containing all font family names available in the
      GraphicsEnvironment when null is passed for the Locale argument.

      sample test is below
      -------------------
      import java.awt.*;

      public class Test{

      public static void main(String[] args){
      GraphicsEnvironment ge = GraphicsEnvironment.
                  getLocalGraphicsEnvironment();
              String[] fnts = ge.getAvailableFontFamilyNames(null);
             
      }
      }

            jehung Jeannette Hung (Inactive)
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: