Skip to content

Commit

Permalink
Mark TarOutputStream as restricted (#4272)
Browse files Browse the repository at this point in the history
* removed deprecated TarOutputStream

* restored TarOutputStream and added @restricted(NoExternalUse.class) to the class as suggested

* Added @restricted(NoExternalUse.class) to TarInputStream

* added the @RestrictedSince(2.200) as suggested
  • Loading branch information
StefanSpieker authored and oleg-nenashev committed Oct 10, 2019
1 parent adcf572 commit b26fff4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Expand Up @@ -23,8 +23,11 @@

package hudson.org.apache.tools.tar;

import hudson.RestrictedSince;
import org.apache.tools.tar.TarBuffer;
import org.apache.tools.tar.TarEntry;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

import java.io.FilterInputStream;
import java.io.IOException;
Expand All @@ -40,6 +43,8 @@
* @deprecated Use {@link org.apache.commons.compress.archivers.tar.TarArchiveInputStream} instead
*/
@Deprecated
@Restricted(NoExternalUse.class)
@RestrictedSince("2.200")
public class TarInputStream extends FilterInputStream {

// CheckStyle:VisibilityModifier OFF - bc
Expand Down
Expand Up @@ -23,9 +23,12 @@

package hudson.org.apache.tools.tar;

import hudson.RestrictedSince;
import org.apache.tools.tar.TarBuffer;
import org.apache.tools.tar.TarConstants;
import org.apache.tools.tar.TarEntry;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;

import java.io.FilterOutputStream;
import java.io.OutputStream;
Expand All @@ -41,6 +44,8 @@
*
*/
@Deprecated
@Restricted(NoExternalUse.class)
@RestrictedSince("2.200")
public class TarOutputStream extends FilterOutputStream {
/** Fail if a long file name is required in the archive. */
public static final int LONGFILE_ERROR = 0;
Expand Down

0 comments on commit b26fff4

Please sign in to comment.