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

Graphics2D.clip specifies incorrectly that a 'null' is a valid value for this method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 1.3.0
    • client-libs
    • 2d
    • b11
    • generic
    • generic

      The API doc for Graphics2D.clip(shape s) claims that passing a null argument would actually clear the existing clipping area. This is incorrect. This statement is applicable only to G2D.setClip() and not for the clip() method. G2D.clip() would throw a NullPointerException when it encounters a null argument.

      Hence the '@param' of G2D.clip(shape s) must be changed to state that a null argument would throw a NPE.

      This has been there since 1.3.
      ###@###.### 2004-12-09 04:11:35 GMT

            psadhukhan Prasanta Sadhukhan
            pmohansunw Praveen Mohan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: