Improve null check in DeflaterOutputStream/InflaterInputStream

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: None
    • Component/s: 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;
              }

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

              Created:
              Updated:
              Resolved: