Skip to content

Commit

Permalink
Use Java 7 versions of GZIPInputStream and GZIPOutputStream (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
basil authored May 25, 2024
1 parent 3605a77 commit 48cc46e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 9 deletions.
5 changes: 0 additions & 5 deletions core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,6 @@
</properties>

<dependencies>
<dependency>
<groupId>com.jcraft</groupId>
<artifactId>jzlib</artifactId>
<version>1.1.3-kohsuke-1</version>
</dependency>
<!-- optional REST support -->
<dependency>
<groupId>com.sun.xml.txw2</groupId>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/kohsuke/stapler/ResponseImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

package org.kohsuke.stapler;

import com.jcraft.jzlib.GZIPOutputStream;
import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.io.ByteArrayOutputStream;
Expand All @@ -40,6 +39,7 @@
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.zip.GZIPOutputStream;
import javax.servlet.ServletException;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletRequest;
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/org/kohsuke/stapler/Stapler.java
Original file line number Diff line number Diff line change
Expand Up @@ -927,7 +927,7 @@ public static boolean isSocketException(Throwable x) { // JENKINS-10524
return true;
}
if (x instanceof IOException
&& "finished".equals(x.getMessage())) { // com.jcraft.jzlib.DeflaterOutputStream.write
&& "write beyond end of stream".equals(x.getMessage())) { // java.util.zip.DeflaterOutputStream.write
return true;
}
return isSocketException(x.getCause());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package org.kohsuke.stapler.compression;

import com.jcraft.jzlib.GZIPOutputStream;
import java.io.IOException;
import java.io.OutputStreamWriter;
import java.io.PrintWriter;
import java.util.zip.GZIPOutputStream;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpServletResponseWrapper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

package org.kohsuke.stapler.framework.io;

import com.jcraft.jzlib.GZIPInputStream;
import java.io.Closeable;
import java.io.DataInputStream;
import java.io.EOFException;
Expand All @@ -40,6 +39,7 @@
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.StandardOpenOption;
import java.util.zip.GZIPInputStream;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.io.output.CountingOutputStream;
import org.kohsuke.stapler.StaplerRequest;
Expand Down

0 comments on commit 48cc46e

Please sign in to comment.