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

drawString (null, int, int) throws different Exception type than 1.1

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      1.2.2
    • CPU:
      x86
    • OS:
      windows_nt

      Description



      Name: diC59631 Date: 08/17/98


      [Need to add beta4 to Release dialog (and fcs too, as licensees have access to it...)]

      Passing a String variable that is set to null to Graphics.drawString() brings up a Windows Application Error dialog.

      JDK 1.1.6 throws a NullPointerException.

      I'd rather see the exception thrown.

      import java.awt.*;

      public class NullString extends java.applet.Applet {
        String s;
        public void paint (Graphics g) {
          g.drawString (s, 30, 30);
        }
      }


      (Review ID: 37127)
      ======================================================================

        Attachments

          Activity

            People

            Assignee:
            ehawkessunw Eric Hawkes (Inactive)
            Reporter:
            dindrigo Daniel Indrigo (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: