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

Improve null check in DeflaterOutputStream/InflaterInputStream

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • None
    • core-libs
    • b20

    Description

      code like below will create Deflater before null check, although it's not a real mem leak, but it's better to do null check before new Deflater.

              try {
                  DeflaterOutputStream dos = new DeflaterOutputStream(null);
              } catch (NullPointerException e) {
                  passed = true;
              }

      Attachments

        Issue Links

          Activity

            People

              mli Hamlin Li
              mli Hamlin Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: