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

Improve null check in DeflaterOutputStream/InflaterInputStream

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      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

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

                Dates

                Created:
                Updated:
                Resolved: