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

Improve null check in DeflaterOutputStream/InflaterInputStream

XMLWordPrintable

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

      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;
              }

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

              Created:
              Updated:
              Resolved: