mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

Valery Kharseko
yesterday 0885d16ac22a0ecd2267bf3c8818a3a8a5a9dadb
opendj-server-legacy/src/main/java/org/opends/quicksetup/util/ZipExtractor.java
@@ -100,15 +100,22 @@
                                      Application app)
    throws FileNotFoundException, IllegalArgumentException
  {
    this(new FileInputStream(zipFile),
    // The name is validated before the stream is opened, otherwise the stream would leak when the
    // validation fails.
    this(openZipFile(zipFile),
      minRatio,
      maxRatio,
      numberZipEntries,
      zipFile.getName(),
      app);
  }
  private static FileInputStream openZipFile(File zipFile) throws FileNotFoundException
  {
    if (!zipFile.getName().endsWith(".zip")) {
      throw new IllegalArgumentException("File must have extension .zip");
    }
    return new FileInputStream(zipFile);
  }
  /**